Ok so I downloaded the theme chili-light with lightbox already added. Right out of the box it works fine, but I really wanted to use slimbox version. So I followed the instructions here,
http://www.digitalia.be/software/slimbox, but it doesn't work. The images just open as usual no lightbox effect. Where am I going wrong??
Thanks,
FH
Comments
http://www.pawelnawrocki.com/zenphoto/
One feature I wanted to include was the ability to send someone a URL and have the album page load and then open Slimbox automatically for that picture.
I found some sample code to get that working with Lightbox here:
http://www.bram.us/2007/07/30/my-code-snippet-automatically-start-lightbox-on-page-load/
In order to get it working with mootools/slimbox, in needed a slight change to album.php...
script for the head:
`
// <![CDATA[<br />
window.addEvent('domready', function(){setTimeout(function() { if(document.location.hash && $(document.location.hash.substr(1)).rel.indexOf('lightbox')!=-1) { Lightbox.show($(document.location.hash.substr(1))); }}, 250 );});
// ]]>
`
And for image link:
`
" title="<?php echo getImageTitle();?>" rel="lightbox[album]" id="<?php printImageID(); ?>">`
That gives each image an anchor id with the number, like "image_11". So, if you hit the url
http://mysite/gallery/somealbum/#image_11
it loads the album page, them pops open slimbox for that image.
Note: when using the anchor link URL, the image loads on its own (not as part of a set) so you don't get any back/next unless you close the slimbox and click on an image -- then it works like a regular set). I think that might be fixed by calling the slimbox click method instead of show, but I haven't had time to try that yet.
I'd also like at some point to have the image display the direct link (make it easier for people to copy/email the link, etc.) but that'll need some more time, too.
`
" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>
`
contained the rel=lightbox attribute so I removed it and hey-presto it all worked.