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!

Comments

locomo’s picture

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?

locomo’s picture

Title: Grouping with custom class handling » Lightbox Grouping by Custom Trigger Class Name
Category: support » feature

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)

awasson’s picture

Has this been resolved?
This description fits the exact problem I was facing and I think I know what's going on....

I am using D6 (6.22) with IMCE/WYSIWYG (latest) and Lightbox2 (6.x-1.11)

I set the Auto Image Handling for:
Custom Class Images => Automatic handler for custom class images: "Lightbox Grouped" and then added my custom class "popup"

* The important think to keep in mind is that the Lightbox2 module will only apply the automatic handler behavior to images with the custom class="popup", not anchors or spans that are applied around the image or anchor. WYSIWYG editors often apply classes by wrapping the element in question with a span="custom-class".

With this in mind, I made a table of thumbnails that I would link to their larger versions and then in WYSIWYG's image UI, I applied the custom class to each image. Then I linked each image to their appropriate larger version.

It worked perfectly, click on an image and you get the lightbox with prev & next links.

Andrew

marcopanichi’s picture

In Drupal 7 - Lightbox2 (version 7.x-1.0-beta1) I simply solved by setting appropriately the lightbox plugin:

  1. Configuration > User Interface > Lightbox 2
  2. Group display settings > Group by field name and node id
baseball’s picture

Dear marcopanichi :

Do you mean:
1. Configuration > User Interface > Lightbox 2
2.Group display settings > Group by field name and node id
3.add <img src="AA.jpg" class="myclass"> in the article.
4.the myclass is to fix all image for one size as :
.myclass{width:200px;}

5.then the article can be pop out the source?
please help me for this case
thx.

marcopanichi’s picture

Hi baseball,

unfortunately I no longer use drupal for my projects so I do not have a ready answer to your question.

baseball’s picture

Dear marcopanichi:
that ok, thank for your feedback.