July 27, 2024

It’s only fledgling but you can download and play with (and decode for your own use) my version of a javascript rollover gallery for Lightroom.
While this works in and of itself and is based on the Scroll Extra gallery below, it has a number of things added and equally so, missing.
CSS: I’ve updated to the correct CSS file calling technique. In Scroll Extra I literally just made a call to the file using the standard call. This one line of code is now replaced by about 15 lines of XSLT instead. While the first one worked fine on Mac, johnbeardy reported it broken on Windows. This bit solves that.

Missing: I cannot make the XSLT call the first image to display when the gallery loads.
Here’s my code for calling the thumbnail with the link that allows the javascript call:





< img xmlns="http://www.w3.org/1999/xhtml" src="{$path}" alt="" name="a1" />< /a>

The previewFull tag calls the full image into the main viewer when you mouse over the thumbnail.
Much as I try the same code for previewFull does not call the first image for display on loading. I know it’s something stupid that I’m doing or missing.

A few notes on the above code. path and previewFull call rendition, size and path. These make sense to view, but have no relation to anything in the galleryMaker.xml or tranformer.xml file. So where are they referencing? Well as it turns out, they are referencing the source.xml file that you can create by removing the comments around that section of code in transformer.xslt.
Examining a sample source.xml file I can see the following:






I can see that this image has 2 renditions: 600X400 called image and 60X40 called thumb. Also the path of each rendition is included.
So our “rendition[@size=’thumb’]/@path” calls the image located at the ‘path’ that is sized thumb.
Also each img call is inside the folder which is where the comes from

Things I’d like to do in XSLT: create cropped square thumbs ala php, Embed paypal links. I should also try adding radio buttons to let people rate the image as an experiment in creating feedback from images.

2 thoughts on “RollOver

  1. Sorry I didn’t reply to this, I thought I had. I’m aware of the clip proprty, but for some reason I couldn’t get it to work for me inside Lightroom. I’ll keep at it though.

  2. Sean, what do you mean about “cropped square thumbs ala php”? PHP? Isn’t there a clip property in css? Anyway, nice work.
    JohnB

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Verified by MonsterInsights