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.
I was reading Jim R post on LUA (his works for me on Windows 10, LR classic), and used his code as a prototype to suppress unwanted characters.
{LUA= if Title ~= nil and Title ~= "" then
if Caption ~= nil and Caption ~= "" and Caption ~= Title then return sprintf("%s %s %s %s", Title, Caption, Month, YYYY)
else return sprintf("%s - %s %s", Title, Month, YYYY)
end
else
if Caption ~= nil and Caption ~= "" then return sprintf("%s - %s %s", Caption, Month, YYYY)
else return sprintf("%s %s", Month, YYYY)
end
end}
I tried adding a \n character in the first sprintf; the results were that it published but the appearance of the album has no images. I am wondering if I have exceeded a margin or something? I have only tried it with vegas, not any of the others.
Offline
Line breaks, when not properly encoded for Web display, can cause all manner of problems. I'd avoid them.
Offline
The other image forms of Theater all present images, just not vegas. However, only stills shows the metadata, but without the newline
Offline
Well, that's makes perfect sense then. Vegas loads images from a JSON array. Unformatted line-breaks break JSON.
Offline
Where’s the JSON come from? Encoded JSON should encode line breaks properly.
Offline
In my testing, a "\n" gets passed through as-is in the JSON and doesn't break it. In HTML, the newline has no effect. In JS, it probably breaks scripts.
Testing with <br/> passes the code through an an encoded form (i.e. <lbr/>), which displays literally as as "<br/>" to screen. I'll investigate further to see whether this can (and should) be handled as HTML.
Offline