Hi,
So I have lightbox up and running nicely - Thanks!
One of the issues I'm having is that I want it to work for all the image nodes in my image galleries. So I checked the 'Enable for image nodes' and also 'Enable for grouping'
Problem is it works too well. On my list of galleries page, clicking on the image to take you to a specific gallery triggers lightbox. Ideally this should ony work on actual image nodes. The text underneath the gallery will still take me to the gallery itself.
Example - the record label site I'm doing right now has a gallery structure like this...
Artists
-Emilia
-Urban Legend
-Star
Shows
-poland
-New York
I have a menu section for 'Shows' and one for 'Artists' on either of these pages clicking on the gallery preview image triggers the lightbox.
Thanks in advance...!
Comments
Comment #1
Tresler commentedOk, I'm not a javascript person, but it appears to work off the thumbnail class name - which makes sense. Except if you are using image assist or have nested galleries.
Easy work around for img_asst is to just change the code it generates (html format anyway to a different class and add the appropriate entry to your stylesheet.
Bu the galley class is built into the image tag by the image module, not by the gallery php template. Let me look int this some more.
Comment #2
kleingeist commentedif you didn't overwrote the default
theme_image_galleryyou can seperate image-lists from gallerie-lists by the class name of the surroundingul. So it is possible to apply the lightbox effect only to image-lists.This is an example code, which replaces the "image_nodes.js". If you have to modify the "image_nodes_nogroup.js" and replace
parent.rel = "lightbox[node_thumbnails]";withparent.rel = "lightbox";.Altough this code is working, i think there is room for some optimization, but im not really familiar with prototype and scriptacolous (AND the first one is nearly undocumented *brrr*)
so heres the code:
Comment #3
stella commentedShould be fixed in both lightbox2 4.7.x-1.0 and lightbox2 5.x-1.1. There is now an option on the lightbox2 settings page to disable the lightbox for images that are links to nested galleries.
If any changes are required for the img_assist module, please open a separate issue.
Cheers,
Stella
Comment #4
stella commentedComment #5
cdrees commentedStill does not work when using Image Assist. When you click on the Image Assist icon for it to pop-up a gallery of images to insert, lightbox2 is invoked and doesn't allow you to insert the image.
Thanks!!
Comment #6
stella commentedcdrees: this issue is now closed and mainly dealt with the gallery problem. Comment #3 advised opening a separate issue for problems related to the image assist module. Someone already did this, see #144513, and patches were committed. Please update issue #144513 if you still have problems with image assist integration.
Cheers,
Stella