Lightbox2 doesn't work for ImageField 2 CCK fields in Drupal 6 with ImageCache 2. I started debugging it, but it looked like a major issue, or large part of lightbox 2 that hasn't been ported for Drupal 6. It seems that Lightbox2's theme hook ids for CCK display formatters (e.g. lightbox2][product-view][full-node-large where product-view and full-node-large are ImageCache presets) are not registered with hook_theme(). Indeed function lightbox2_theme() is static and does not create hook-able theme IDs based on dynamic imagecache presets and Lightbox2 settings. Also, the syntax for lightbox formatters / theme hooks probably will need to change in drupal 6 – since I don't think theme hook IDs in Drupal 6 can contain [, ] or - characters.
On a related note, the selector for formatters is very difficult to use. This has a significant impact on the usability of Lightbox2, and CCK and Views when Lightbox2 is enabled. With just a few imagecache presets and default lightbox settings, the list of formatter options becomes unwieldingly large. A suggestion; consider allowing a Lightbox2 user to create an arbitrary number of "Lightbox2 presets", in which they specify the rendered image format (such as an imagecache preset), the lightbox2ed image format (such as the original image, or another imagecache preset), and other settings, such as 'iframe', 'slideshow', etc.
A Lightbox2 user can then create the presets they want to use on the website (probably only a handful for most websites), and Lightbox2 can expose only these presets to the CCK formatters options. The list of options becomes much shorter and is no longer overwhelming. It also makes it easier to make the behaviours of Lightbox2's consistent throughout a website.
The disadvantage is that more effort is required on the part of the user to get Lightbox2 working out of the box. To aid in this, Lightbox2 could provide 2 or 3 useful default "Lightbox2 presets" that the user can modify or clone.
Comments
Comment #1
stella commentedDuplicate of #283661: Drupal 6.16, Lightbox2, imagecache, imagefield and cck issue
Comment #2
Bevan commentedThanks Stella! I got it working now. See http://feriana.co.nz/handbag/camila to see how I've employed lightbox on a product page of a website.
Did you consider the suggestion for UI and usability improvements? Should I move these into a new issue?
Comment #3
stella commentedpostponed until after next release.
Cheers,
Stella
Comment #4
stella commentedduplicate of #409354: Performance issues with large number imagecache presets and content types