Closed (fixed)
Project:
Galleria
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2009 at 16:42 UTC
Updated:
1 Jun 2009 at 15:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
roger6106 commentedExample galleria here: [removed]
Try clicking on the thumbnail of the 3rd picture, then on the main image. The lightbox that opens will say image 1 of 9 when it should say image 3 of 9. If you click next it will say image 2 of 9 and show the first picture. It should show the 4th picture and say image 4 of 9.
Comment #2
eromba commentedThanks for reporting this one, Roger. It looks like I took the wrong approach when I originally implemented this feature--I treated the main image as another lightbox-enabled image and had the Lightbox2/jQuery Lightbox module rescan the page every time that image changed. Since the main image comes before the rest of the thumbnails, however, it always appears as "1 of __" like you described.
The right approach is to make the main-image onclick action reference the corresponding thumbnail. That way, the images will appear in the same order in the lightbox.
Luckily, the fix isn't very involved, and now the lightbox module won't have to rescan the page each time you change images.
The patch is attached. I've tested it successfully with jQuery Lightbox and the latest dev version of Lightbox2.
Comment #3
Mark Theunissen commentedCool thanks! Does it require that dev version? Or is that just the one you used for testing?
Comment #4
eromba commentedThe 6.x-1.9 release of Lightbox2 seemed have a lot of behavioral issues (on its own, not just regarding Galleria integration) that went away when I upgraded to the latest dev version, but I have the feeling it was due to my configuration and/or conflicts with other modules. Technically, the patch should work just as well with Lightbox2 6.x-1.9. Let me know how your testing goes.
Comment #5
Mark Theunissen commentedIs there any reason why the variable num_thumbs is outside the options in the global scope?
I've moved it into the options namespace and everything seems to work fine:
Comment #6
eromba commented@Mark: No particular reason. I was just cranking out this patch in a hurry. ;)
Comment #7
Mark Theunissen commentedCommitted to -dev. Thanks!
Comment #8
roger6106 commentedI'm using Lightbox2 6.x-1.9 after updating to the latest Galleria dev, and it works great. Thanks!