Lightbox Grouping by Custom Trigger Class Name

locomo - November 9, 2009 - 02:13
Project:Lightbox2
Version:6.x-1.9
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Running Lightbox2 6.x-1.9

Under Automatic Handlers I have everything disabled except for Custom Class Images

Automatic handler for custom class images: Lightbox Grouped
Custom image trigger classes: "photogallery"

On a given node my desired behavior is to have all images on the page open in a grouped lightbox. Some of the images are loaded via 2 different imagefields and some are loaded via img_assist module. When looking at the source code I can confirm that all of the images have the "photogallery" class in the "img" tag.

However for some reason the images are not opening up grouped together - the images in each imagefield are grouped together and the img_assist images are grouped together separately. Is this by design - can I get this behavior with Custom image trigger classes alone? Or do I need to use the "rel" attribute?

thanks!

#1

locomo - November 21, 2009 - 19:45

hi.. sorry to bump this but i'm really confused why this isn't working

here's an example page:
http://omaha.net/la-buvette

if you click on the images in the page you'll see that the 2 larger images open in a lightbox but are not grouped with the 3 smaller thumbnails at the bottom of the page.. all 5 images have my trigger class though "photogallery"

anyone have any ideas? am i confusing how the Custom Class Images automatic handler works?

#2

locomo - November 23, 2009 - 05:22
Title:Grouping with custom class handling» Lightbox Grouping by Custom Trigger Class Name
Category:support request» feature request

Ok - at line 172 of auto_image_handling.js

i changed this:
rel = rel_type + "[" + $(child).attr("class") + "]";

to this:
rel = rel_type + "[" + custom_class + "]";

not sure if this is a bug or a feature request.. but to me, when triggering a grouped lightbox with a custom class its more intuitive to group on the custom class than on the entire class attribute

this could probably be another option in the drop down menu that reads:
"Automatic handler for custom class images: "

the new option could be: "Lightbox Grouped by Custom Trigger Class Name"

(or something like that)

 
 

Drupal is a registered trademark of Dries Buytaert.