PDA

View Full Version : HTML in gallery descriptions?


Cindy
Oct-11-2005, 11:08 AM
Can I use basically any html code in gallery descriptions. I know I can add links etc., but will font color, size, etc work and display properly in various browsers? I think I recall someone writing in about this awhile back but I can't find the thread now.
Thanks,
Cindy

jfriend
Oct-11-2005, 11:24 AM
Can I use basically any html code in gallery descriptions. I know I can add links etc., but will font color, size, etc work and display properly in various browsers? I think I recall someone writing in about this awhile back but I can't find the thread now.
Thanks,
Cindy
If I recall from previous threads, I think if you just start your description with <HTML> and end it with </HTML> that smugmug will not do any processing on what's between those two tags so you can put any arbritrary HTML in there. If you don't put those tags in, smugmug will try to do some processing on it (changing things into links, inserting <BR> tags, etc...) and probably mess up what you were trying to do with your own HTML.

Disclaimer: I haven't tried this myself, but I think this is what JT has said is supported now.

--John

Cindy
Oct-11-2005, 11:31 AM
If I recall from previous threads, I think if you just start your description with <HTML> and end it with </HTML> that smugmug will not do any processing on what's between those two tags so you can put any arbritrary HTML in there. If you don't put those tags in, smugmug will try to do some processing on it (changing things into links, inserting <BR> tags, etc...) and probably mess up what you were trying to do with your own HTML.

Disclaimer: I haven't tried this myself, but I think this is what JT has said is supported now.

--John
Thanks John. Forgot to ask but would that apply to photo captions as well?
I've created a gallery for "Favorite Athletes" where I've started putting atheletes that pre-purchase packages &/or have bought several prints. Beside each photo I put a link (their keyword) to find their photos. I'd like to change the font color & size so... that's why in case anyone wondered - lol.

jfriend
Oct-11-2005, 11:37 AM
Thanks John. Forgot to ask but would that apply to photo captions as well?
I've created a gallery for "Favorite Athletes" where I've started putting atheletes that pre-purchase packages &/or have bought several prints. Beside each photo I put a link (their keyword) to find their photos. I'd like to change the font color & size so... that's why in case anyone wondered - lol.
I don't know. You'll have to just try it. A 2-minute experiment yourself (when smugmug is up and running normal again) will probably show you which fields you can do this in.

--John

Mike Lane
Oct-11-2005, 11:42 AM
If you use html in your comments, bio, or captions (probably elsewhere) surround it with <html> </html>. If you don't surround it with html tags you will find that most of your html gets stripped and some default formatting gets inserted.

Cindy
Oct-11-2005, 09:02 PM
If you use html in your comments, bio, or captions (probably elsewhere) surround it with <html> </html>. If you don't surround it with html tags you will find that most of your html gets stripped and some default formatting gets inserted.
Hi Mike. I missed your post today during all the up roar.
Took the better part of today to again study all this CSS & html stuff... plus loads of webpages view source info. I'm wondering now if css would be better/easier to use in the gallery descriptions rather than html. Any thoughts?

My site has got along way to go.... *sigh* but :-)

Thanks,
Cindy

colourbox
Oct-11-2005, 09:42 PM
Thanks John. Forgot to ask but would that apply to photo captions as well?

I've experimented a little with HTML in captions. Seems to work there. However, I'm not sure why but in the caption using CSS formatting for text seems to be more reliable than using HTML formatting. In other words, when I used HTML methods to format bold, size, etc. it doesn't look right in a few browsers, but when I used CSS methods (<span> for example) it does work consistently.

Mike Lane
Oct-11-2005, 09:58 PM
Hi Mike. I missed your post today during all the up roar.
Took the better part of today to again study all this CSS & html stuff... plus loads of webpages view source info. I'm wondering now if css would be better/easier to use in the gallery descriptions rather than html. Any thoughts?

My site has got along way to go.... *sigh* but :-)

Thanks,
Cindy
CSS and HTML are like peas and carrots, peanut butter and jelly, turkey and swiss, uh... or whatever. You don't get much if you have one without the other. So I'd say use some smart (http://www.alistapart.com/articles/separationdilemma) semantic xhtml in your bio, captions, gallery descriptions, etc and then style that with css.

Mike Lane
Oct-12-2005, 11:24 AM
For the life of me I couldn't find this link (http://tantek.com/presentations/2005/09/elements-of-xhtml/). It was right there in my delicious where it should be.

Anyhow, check it out, it's really fantastic.

Cindy
Oct-13-2005, 01:09 AM
For the life of me I couldn't find this link (http://tantek.com/presentations/2005/09/elements-of-xhtml/). It was right there in my delicious where it should be.

Anyhow, check it out, it's really fantastic.
Oh wow... you've given me alot to look over Mike.
My head is spinning and thinking hmmmmm....
maybe I'd better seriously consider begging you do my site :)
I looked at several you've done and am thourally impressed - great Job!!!
I'll look over these links more fully when I've got more time to digest it.
At the moment I have 4 games of pics waiting to be processed and not nearly enough time to get it all done *sigh* besides a ton of other stuff waiting for my attention.

In the meantime if anyone cares to take a quick run through of my site (realizing there are lots of changes that need to happen) and offer up any suggestions I'm all ears.

Thanks for all the replies,
Cindy

Andy
Oct-13-2005, 03:35 AM
cindy, it's starting to come together nicely :D

* try to reduce the "bloat" on your banner - 80kb adds to the initial wait. use save for web, make it a gif, you know...

* love that you've got your number there. more pro tips here (http://www.dgrin.com/showthread.php?t=20236)

* try making your private galleries private they will not show on the main page. or at least put them behind a category ...

Cindy
Oct-13-2005, 04:16 AM
Thanks so much for the tips Andy. You shouldn't be seeing any private galleries on my mainpage though... wonder what's up with that? I currently have 6 catagories set to display & that's what I see. When I'm signed in I can see 2 extra catogores that contain private only galleries... but no one else should be able to see them at all should they? Would you mind taking another look and telling me the name or title your seeing?

I'm not sure I'm too fond of my banner so I might be changeing it soon... in the meantime I'll get it reduced though.

Thanks again,
Cindy

Andy
Oct-13-2005, 04:32 AM
Thanks so much for the tips Andy. You shouldn't be seeing any private galleries on my mainpage though... wonder what's up with that? I currently have 6 catagories set to display & that's what I see. When I'm signed in I can see 2 extra catogores that contain private only galleries... but no one else should be able to see them at all should they? Would you mind taking another look and telling me the name or title your seeing?

I'm not sure I'm too fond of my banner so I might be changeing it soon... in the meantime I'll get it reduced though.

Thanks again,
Cindy

i see you fixed it - gallery customization>private

excellent!

Cindy
Oct-13-2005, 04:39 AM
Thats REAL strange... I didn't change anything other than sign out & sign in to see if something was showing that I wasn't aware of. Working on the banner now but even gif isn't reducing it much without lots of distortion... guess I'll go as low as I can then start work on another :)
Thanks Again,
Cindy

rainforest1155
Oct-13-2005, 09:54 AM
@JT
On the homepage all html is filtered out of gallery descriptions. This is also true for the captions in Traditional view. I get your point in doing this, but for my project to create a bi-lingual site (http://www.dgrin.com/showthread.php?t=20305) it would be really helpful when you could enable the <SPAN>-tags in the gallery descriptions on the homepage and captions in Traditional view.
This way I could translate my English gallery-names on the homepage into German using the description as some kind of subtitle, but in English I don't need them and want to turn them of on the homepage.
In Traditional view it's confusing to see the English and German title at once if it's short enough. So with the help of the <SPAN>-tag I could simply turn off the 2nd language as in all the other views.

Thanks,
Sebastian

Mike Lane
Oct-13-2005, 10:14 AM
@JT
On the homepage all html is filtered out of gallery descriptions. This is also true for the captions in Traditional view. I get your point in doing this, but for my project to create a bi-lingual site (http://www.dgrin.com/showthread.php?t=20305) it would be really helpful when you could enable the <SPAN>-tags in the gallery descriptions on the homepage and captions in Traditional view.
This way I could translate my English gallery-names on the homepage into German using the description as some kind of subtitle, but in English I don't need them and want to turn them of on the homepage.
In Traditional view it's confusing to see the English and German title at once if it's short enough. So with the help of the <SPAN>-tag I could simply turn off the 2nd language as in all the other views.

Thanks,
Sebastian
I haven't looked at this closely, but I meant to ask. Are you surrounding your captions and gallery descriptions with html tags? For example put exactly this in your captions:

<html>This is a <span class="bold">caption</span></html>

Your span should not have been stripped. Like I said, you may be doing this, I haven't been able to look into it just yet.

{JT}
Oct-13-2005, 10:20 AM
This probably is not going to happen. The reason why all HTML is stripped on the homepage is because we only use the first 80 characters of the caption. If you were to add a span tag that had a class or id then you would be left with far fewer characters for the caption. And with that happening, what would end up is that tags would not be closed properly and the page would end up with rendering errors (and then more emails to support).

@JT
On the homepage all html is filtered out of gallery descriptions. This is also true for the captions in Traditional view. I get your point in doing this, but for my project to create a bi-lingual site (http://www.dgrin.com/showthread.php?t=20305) it would be really helpful when you could enable the <SPAN>-tags in the gallery descriptions on the homepage and captions in Traditional view.
This way I could translate my English gallery-names on the homepage into German using the description as some kind of subtitle, but in English I don't need them and want to turn them of on the homepage.
In Traditional view it's confusing to see the English and German title at once if it's short enough. So with the help of the <SPAN>-tag I could simply turn off the 2nd language as in all the other views.

Thanks,
Sebastian

rainforest1155
Oct-13-2005, 10:33 AM
I haven't looked at this closely, but I meant to ask. Are you surrounding your captions and gallery descriptions with html tags? For example put exactly this in your captions:

<html>This is a <span class="bold">caption</span></html>

Your span should not have been stripped. Like I said, you may be doing this, I haven't been able to look into it just yet.Jep tried that and I thought it worked the first time, but then I couldn't get it done again. Now I tried again - at first it worked, but then it was broken again. I figured that when I enter it using the AJAX edit, that <html> would not show up in the regular gallery customization. :dunno

Something is not quite right there...If I figure out what it is, I'll let you know.

Sebastian

EDIT: When I edit it with AJAX directly on the startpage, it works until I reload the page, but not in any case. :dunno

bwg
Oct-13-2005, 10:35 AM
sure, take the easy way out...

This probably is not going to happen. The reason why all HTML is stripped on the homepage is because we only use the first 80 characters of the caption. If you were to add a span tag that had a class or id then you would be left with far fewer characters for the caption. And with that happening, what would end up is that tags would not be closed properly and the page would end up with rendering errors (and then more emails to support).

jfriend
Oct-13-2005, 10:40 AM
This probably is not going to happen. The reason why all HTML is stripped on the homepage is because we only use the first 80 characters of the caption. If you were to add a span tag that had a class or id then you would be left with far fewer characters for the caption. And with that happening, what would end up is that tags would not be closed properly and the page would end up with rendering errors (and then more emails to support).
I get the problem you are trying to solve, but I've found this is a real limitation on certain kinds of customization. I wish there was a way to let us control the page and not have the 80 character clipping. On this page (http://jfriend.smugmug.com/Talent%20Show%202005), I would have been happy to change the CSS to allow more room for the full descriptions since they really help people find the right gallery, but that's currently impossible due to the hard-wired description limit.

What if you don't truncate the description or caption if it starts with <HTML> and figure that if the site owner is taking control by inserting <HTML>, then it's their responsibility to make it look good? Isn't that a win/win?

--John

rainforest1155
Oct-13-2005, 10:46 AM
This probably is not going to happen. The reason why all HTML is stripped on the homepage is because we only use the first 80 characters of the caption. If you were to add a span tag that had a class or id then you would be left with far fewer characters for the caption. And with that happening, what would end up is that tags would not be closed properly and the page would end up with rendering errors (and then more emails to support).Can't you ignore html-tags during counting?

Sebastian

jfriend
Oct-13-2005, 11:02 AM
Can't you ignore html-tags during counting?

Sebastian
No, that won't work. You technically could ignore the tags while counting, but that won't solve the problem for many types of HTML.

First, there are open and close tags. You can't truncate between two of those or you get invalid HTML so that basically means that you can't truncate at all if there are HTML tags.

Second, the previous example of two languages between two different <SPAN> tags just wouldn't work for truncating at all. If the page is set to French, you don't want the first 80 characters of the English tag. You need the whole thing and then your CSS/JavaScript has to decide how to make it all work.

--John

Mike Lane
Oct-13-2005, 11:15 AM
No, that won't work. You technically could ignore the tags while counting, but that won't solve the problem for many types of HTML.

First, there are open and close tags. You can't truncate between two of those or you get invalid HTML so that basically means that you can't truncate at all if there are HTML tags.

Second, the previous example of two languages between two different <SPAN> tags just wouldn't work for truncating at all. If the page is set to French, you don't want the first 80 characters of the English tag. You need the whole thing and then your CSS/JavaScript has to decide how to make it all work.

--John
You couldn't make it perfect. The parts where the caption or description is truncated would be in the first language in the series of spans; however, you could switch most of the rest of the site.

Ultimately, this could be something that Smugmug generates server side which would make this work everywhere. But for now, we need to see how this sort of thing can work. And I think it could work out fairly well.

rainforest1155
Oct-13-2005, 11:46 AM
Was worth a try, but I think you're right that it would involve to many known and unknown problems.

Looking forward to a server-side implementation though! :wink
Sebastian

Mike Lane
Oct-13-2005, 11:58 AM
Looking forward to a server-side implementation though! :wink
Just to clarify, I am certainly not someone who can initiate this sort of thing, it's just an idea I had. I don't know if its possible (well I suppose it's possible, but it may be crazy difficult for all I know), I don't know if this is something that Smugmug wants to do, and I certainly don't have any kind of pull to make them go one way or the other.

So I wouldn't look forward to a server-side thing any time soon. Let's just concentrate on the client side thing we've got going so far :)

{JT}
Oct-13-2005, 12:03 PM
I think that I have a better solution :) Have to run it by everyone but it might just work out.

I get the problem you are trying to solve, but I've found this is a real limitation on certain kinds of customization. I wish there was a way to let us control the page and not have the 80 character clipping. On this page (http://jfriend.smugmug.com/Talent%20Show%202005), I would have been happy to change the CSS to allow more room for the full descriptions since they really help people find the right gallery, but that's currently impossible due to the hard-wired description limit.

What if you don't truncate the description or caption if it starts with <HTML> and figure that if the site owner is taking control by inserting <HTML>, then it's their responsibility to make it look good? Isn't that a win/win?

--John

Mike Lane
Oct-13-2005, 12:04 PM
I think that I have a better solution :) Have to run it by everyone but it might just work out.
You see, that's why JT's the man... Problem solva!

rainforest1155
Oct-13-2005, 12:59 PM
JT, sounds great. I'm looking forward to see with what you're coming up this time.

Just wanted to add to the whole thing that <HTML>-tags are also stripped out of both slideshows. I guess I'm out of luck with the fullscreen slideshow, because that's almost purely javascript?! Maybe there's hope for the standard slideshow, as I at least found the caption in the source one time without being included into any javascript.

Thanks for looking into it,
Sebastian

Cindy
Oct-13-2005, 04:44 PM
work in all gallery views, descriptions, catagories, browers and the bio?
I've been using keywork links and links to various galleries ALOT... if this isn't working correctly in all layouts I wasn't aware of that problem and need to make major changes.

Thanks,
Cindy

Mike Lane
Oct-13-2005, 04:48 PM
work in all gallery views, descriptions, catagories, browers and the bio?
I've been using keywork links and links to various galleries ALOT... if this isn't working correctly in all layouts I wasn't aware of that problem and need to make major changes.

Thanks,
Cindy
No links will be harmed I don't think. You can try it out and let us know:)

Cindy
Oct-13-2005, 04:58 PM
No links will be harmed I don't think. You can try it out and let us know:)
I use IE 6 and it works fine... but am reading in other places that the html gets stripped in various styles, etc. Just needed a heads up if that was the case.

Is there a list of some sort showing what types of html gets left alone... and what gets stripped by smugmug?

Thanks,
Cindy

Mike Lane
Oct-13-2005, 05:00 PM
I use IE 6 and it works fine... but am reading in other places that the html gets stripped in various styles, etc. Just needed a heads up if that was the case.

Is there a list of some sort showing what types of html gets left alone... and what gets stripped by smugmug?

Thanks,
Cindy
The only place that I can imagine links may get affected is in the gallery description preview on the home / category / subcategory pages. All your links should probably work other than that.

{JT}
Oct-13-2005, 05:25 PM
Slideshow is unique - the emphasis is more on the image and not on the caption, so there was never a need (or even a request) to keep HTML in the caption.

Let me think about this a little more and see what I can come up with.

JT, sounds great. I'm looking forward to see with what you're coming up this time.

Just wanted to add to the whole thing that <HTML>-tags are also stripped out of both slideshows. I guess I'm out of luck with the fullscreen slideshow, because that's almost purely javascript?! Maybe there's hope for the standard slideshow, as I at least found the caption in the source one time without being included into any javascript.

Thanks for looking into it,
Sebastian

rainforest1155
Oct-13-2005, 05:50 PM
Slideshow is unique - the emphasis is more on the image and not on the caption, so there was never a need (or even a request) to keep HTML in the caption.

Let me think about this a little more and see what I can come up with.Yeah, but with multiply languages in one caption it can get a littlebit confusing now. Thanks for looking into it. :thumb

Sebastian

Mike Lane
Oct-13-2005, 09:08 PM
Yeah, but with multiply languages in one caption it can get a littlebit confusing now. Thanks for looking into it. :thumb

Sebastian
You've got something totally unique on your site I think sebastian:) I think it's really cool.

Could it be cooler? Yes. But we got the first iteration out of the way. Maybe we can work on more tomorow.

rainforest1155
Oct-14-2005, 01:33 AM
You've got something totally unique on your site I think sebastian:) I think it's really cool.

Could it be cooler? Yes. But we got the first iteration out of the way. Maybe we can work on more tomorow.Thanks Mike - it's awesome what one can achieve over here at SM with the help of all the helpful people from one day to another! :clap
Now I've just to fill it with some more content.

Sebastian

rainforest1155
Oct-15-2005, 12:15 PM
One thing still confuses me. When I entered the <html>-tag in the description using AJAX it sometimes failed resulting in a non-clickable 'edit'-button. No change was made to the description - it did not save, but sometimes it worked.

Therefore I tried it using customize gallery. When I looked into the customize gallery options after saving it, the <html>-tag was gone. It was visible in AJAX and in the sourcecode of the gallery, but it won't show up in customize gallery.

Why is the display of AJAX and the original customize function different? Why it isn't showing up there? That confuses me a lot, as I don't know if I already entered it for sure. Somehow I trusted the old fashioned customize gallery option more - for sure because of the latin character trouble with AJAX, but no I'm lost. :uhoh

Is this intended this way? If yes, why?

Thanks,
Sebastian

rainforest1155
Oct-25-2005, 06:24 AM
Any comment on the missing <html>-tag in gallery descriptions from the SM-team? (last post from myself)

Thanks,
Sebastian

Mike Lane
Oct-25-2005, 07:21 AM
One thing still confuses me. When I entered the <html>-tag in the description using AJAX it sometimes failed resulting in a non-clickable 'edit'-button. No change was made to the description - it did not save, but sometimes it worked.

Therefore I tried it using customize gallery. When I looked into the customize gallery options after saving it, the <html>-tag was gone. It was visible in AJAX and in the sourcecode of the gallery, but it won't show up in customize gallery.

Why is the display of AJAX and the original customize function different? Why it isn't showing up there? That confuses me a lot, as I don't know if I already entered it for sure. Somehow I trusted the old fashioned customize gallery option more - for sure because of the latin character trouble with AJAX, but no I'm lost. :uhoh

Is this intended this way? If yes, why?

Thanks,
Sebastian
Are you saying that you only put the <html> tag? Are you forgetting the </html> tag?

rainforest1155
Oct-25-2005, 07:32 AM
Are you saying that you only put the <html> tag? Are you forgetting the </html> tag?It was a littlebit complicated for me to describe this therefore I only mentioned the <html> tag and omitted the closing </html> tag, but I always use them in a duo. :wink

Sebastian

{JT}
Oct-25-2005, 01:18 PM
Customize gallery does not show the <html> tag you are correct. But I have never seen Ajax screw up the description as a result of the html tag UNLESS you have not closed a tag properly OR you have forgotten the closing </HTML> tag.

rainforest1155
Oct-25-2005, 03:11 PM
Customize gallery does not show the <html> tag you are correct. But I have never seen Ajax screw up the description as a result of the html tag UNLESS you have not closed a tag properly OR you have forgotten the closing </HTML> tag.I'll try to see if I can reproduce an 'Ajax screw up'.

You say the only place to see if I already inserted the <html>-tag is to look in Ajax? Any plans on bringing this into customize gallery? Maybe just indicate it outside of the textbox if putting it into the textbox is the problem. You could do this by writing '<html> already enabled' or something like that next to the textbox. :dunno

Sebastian

{JT}
Oct-26-2005, 01:50 AM
This will be fixed in the next update.

I'll try to see if I can reproduce an 'Ajax screw up'.

You say the only place to see if I already inserted the <html>-tag is to look in Ajax? Any plans on bringing this into customize gallery? Maybe just indicate it outside of the textbox if putting it into the textbox is the problem. You could do this by writing '<html> already enabled' or something like that next to the textbox. :dunno

Sebastian

rainforest1155
Oct-26-2005, 02:01 AM
This will be fixed in the next update.Great! :clap

Sebastian