Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Is there a way to enter hot links in photo captions so when displayed in a CE4 gallery, they work? Thanks.
Offline
yes. In the Library module you need to enter the html in the metadata field you're using for your caption.
Like so:
<a href='http://www.yoursite.com'>Link text</a>
for some reason, using the usual double quote processes out to the html escape character of " upon export, which of course won't work.
There are probably some good reasons for not including html in the captions, like for SEO, but it does seem to work.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Rod. I tried your suggestion but all the code still appears on my html page. Have a look:
http://johnellsworthphoto.com/image/gal … single.php
I tried a simpler link as well. Same results. Code shows. When in the slide-mode, the words "Sagittarius Fire" appear with no code. But when I click it, all icons disappear. My links are supposed to show full white #FFFFFF as in the footnote.
Thanks. If it can't be done, I'll figure something else out. I appreciate it.
Offline
I don't know why it's not working. It works in my tests. What's weird is that for me, Lightroom is changing any double quotes into the html escape characters. I see this happening in the caption when I surround regular works with quotes. Your double quotes are showing up fine in your caption though.
In Site Info, under Page Setup, take a look at the Character set. I'm using utf-8 and the hyperlinks in the captions are working.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks for checking, Rod. I do have the same character set (utf-8). I appreciate your time. You provide a great service. I will let it ride for awhile. Will work on other things.
Offline
It's not weird, it's a feature. See the CE4 Gallery 6.1.3 update:
"Sanitization of ampersands, quotation marks and line-breaks in image titles, captions, and in the grid's metadata display, and in the Album Title and Description."
Sanitizing metadata prevents titles and captions containing quotation marks from breaking img alt and title attributes, and also keeps the Galleria slideshow running in Pages and Stage.
Image metadata should not be used to store HTML, as this is not the intent for metadata in general or in Lightroom's design.
Offline
I understand, Mat. I was confused—In my former TTG HTML galleries, I was able to insert links in the caption field, say for paypal ordering info or a link to a corresponding blog entry: http://johnellsworthphoto.com/galleries … -cafe.html
Can you suggest any other method of entering a link on an image page without corrupting the metadata attributes?
If not, no problem. Thanks.
Offline
Nope.
Writing links -- or any type of HTML -- via metadata has never been a supported feature in any of our galleries. It sometimes worked simply because we did absolutely nothing to filter metadata content in the past. We are now sanitizing some entities for more valid HTML and to prevent code breakages. For example, you may now safely use quotation marks in caption text, which previously was disallowed.
Offline
OK, thanks. Nothing to contest here. I have some other avenues to employ regarding my desire to link associated information on my website (as I rebuild it). Likely from my blog to the photo, rather than vice versa. I appreciate your responsiveness.
Offline
For example, you may now safely use quotation marks in caption text, which previously was disallowed.
Maybe this is why I thought it was weird. The only type of quotation marks that will appear for me are single quotes. If I use double quotes I get the html escape code: ". This shows up in the Web Module as well as in online galleries.
see the captions on the two images in this test gallery: http://ce4.barbeephoto.com/galleries/caption-test/
I'm using Windows, if that might make a difference.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
That's bloody odd, Rod. Works okay for me. I shouldn't think Windows should make difference, but then it's Windows ...
Anyone else reading this that might corroborate Rod's experience?
Offline
tried it on my Windows laptop too. Same results
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Matt. I just tested on my Windows notebook (Windows 8.1) with the latest version of Chrome, Firefox, and IE. It does what Rod is saying.
Monte Trumbull
https://www.montetrumbull.com/
Offline
This is Chrome on a Mac:
I get the same result with Safari. The code is:
<strong>&#34;Rainbow Bridge&#34;</strong>
Looks like the ampersand shouldn't be escaped.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Daniel,
this is coming out of Lightroom on a Windows machine. So I see the problem in Lightroom as well as on the web.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Rod, looks like Matt has a magic computer so it works for him ;-)
Happy New Year!
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
I think he's on a mac
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
And Macs, as we all know, really are magical ...
Offline
Miracle Macs, perhaps?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Okay, I've setup a Windows install of LR 5.7.1 and I'm seeing the problem too. Friggin' weird, that is.
Although, the ampersand replacement (& v &) seems to be okay.
Offline
I found the problem. There's an issue in the sequence of instructions for the sanitization, which for some reason is not an issue running on Mac, but which is an issue running on Windows. Go figure ...
Next update will resolve, but if you'd like to fix this yourself in the meantime, do a
Find:
metadata = string.gsub(metadata, "\"", """)
metadata = string.gsub(metadata, "\n", "<br />")
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&amp;", "&")
and Replace:
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&amp;", "&")
metadata = string.gsub(metadata, "\"", """)
metadata = string.gsub(metadata, "\n", "<br />")
The only difference here is that we're not processing ampersands first, and other things afterward, rather than processing ampersands last.
Offline
Interesting. Was this only an issue with metadata that included new lines? If so, it could be because Windows uses two characters for newlines, \r\n, so the newline substitution might not be working as expected and cause adverse results for subsequent replacements.
Offline
I was testing with just one line of metadata.
Just curious Matt, in what file would that code above be found?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
/lib/lua/setup.lua
/lib/xml/autoindex.xml
Offline
Interesting. Was this only an issue with metadata that included new lines? If so, it could be because Windows uses two characters for newlines, \r\n, so the newline substitution might not be working as expected and cause adverse results for subsequent replacements.
I didn't know that about Windows. So I'll try updating with this:
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&", "&")
metadata = string.gsub(metadata, "&amp;", "&")
metadata = string.gsub(metadata, "\r\n", "<br />")
metadata = string.gsub(metadata, "\n", "<br />")
metadata = string.gsub(metadata, "\"", """)
Offline
Pages: 1