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
Comment #1
locomo CreditAttribution: locomo commentedhi.. 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?
Comment #2
locomo CreditAttribution: locomo commentedOk - 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)
Comment #3
awasson CreditAttribution: awasson commentedHas 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
Comment #4
marcopanichi CreditAttribution: marcopanichi commentedIn Drupal 7 - Lightbox2 (version 7.x-1.0-beta1) I simply solved by setting appropriately the lightbox plugin:
Comment #5
baseball CreditAttribution: baseball commentedDear 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.
Comment #6
marcopanichi CreditAttribution: marcopanichi commentedHi baseball,
unfortunately I no longer use drupal for my projects so I do not have a ready answer to your question.
Comment #7
baseball CreditAttribution: baseball commentedDear marcopanichi:
that ok, thank for your feedback.