Member
Member
fauxhawk   2007-03-20, 01:23
#1
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
Member
Member
monster   2007-03-20, 01:39
#2
http://www.zenphoto.org/support/topic.php?id=1232&page=2#post-7668
http://www.pawelnawrocki.com/zenphoto/
Member
Member
AlexWilson   2007-12-19, 20:38
#3
I've been messing around with adding Slimbox to a theme myself.

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:
`

<script type="text/javascript">

// <![CDATA[

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 );});

// ]]>

</script>

`

And for image link:
`

<a href="<?php echo getDefaultSizedImage(); ?>" 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.
Member
Member
spuddle   2009-08-20, 23:43
#4
Was able to fix this issue. It was likely a user error!

`

<?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>

`
contained the rel=lightbox attribute so I removed it and hey-presto it all worked.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.