Lightbox2 help

Associate
Joined
20 Sep 2003
Posts
2,384
Location
Scotland
Looking for a bit more help with my site design. I want to use lightbox2 ti display mt photo gallery. Problem is I want launch lightbox from one image and them let usres scroll through the image set from there. I cant find a way to do this with lightbox, it seems to only support displaying all images individually then it will let you tag them as part of a group to scroll through them.

I have tried using this code but it wont scroll to the next image

Code:
<a href="gallery/moments/03.jpg" rel="lightbox[moments]">Pics Here</a>
<a href="gallery/moments/04.jpg" rel="lightbox[moments][caption2]"</a>
<a href="gallery/moments/02.jpg" rel="lightbox[moments][caption2]"</a>

Can anyone suggest a way around this, the site in question can be found here:

http://www.rdoyle.info/wedding/v4/

See the "Photo Album" section
 
Well that's an idea but if iinsert the images and hide themwont that still take up a lot of space in my photo album section?

Or am imissing something?
 
Just link text, not the thumbnails and it won't take up much space at all.

Code:
<a href="gallery/moments/03.jpg" rel="lightbox[moments]"><img src="" alt="" /></a>
<a href="gallery/moments/04.jpg" rel="lightbox[moments][caption2]" class="hide">Image</a>
<a href="gallery/moments/02.jpg" rel="lightbox[moments][caption2]" class="hide">Image</a>


Your other alternative would be to expand your plugin and then write a php script to scan a folder and feed it into your plugin. Really not worth it.
 
Last edited:
Ok I tried this code but it still isnt working and the linked text is still displayed on the page, I assume the class="hide" attribute should hide the text links?

Code:
<a href="gallery/moments/03.jpg" rel="lightbox[moments]">Pics Here</a>
<a href="gallery/moments/04.jpg" rel="lightbox[moments][caption2]" class="hide">Pic 2</a>
<a href="gallery/moments/02.jpg" rel="lightbox[moments][caption3]" class="hide">Pic 3</a>
 
As confused has said above, you need to actually create a class, I just put that in as an example.

Also, make sure the rel attributes match. Once you do that, it will work. (edited your page in firebug to check and it does work)

This is wrong...
rel="lightbox[moments][caption2]"

it should be
rel="lightbox[moments]" title="caption2"


You'll want to sort out your next/prev buttons as well. lightbox.css line 13.
 
Last edited:
Cool I got it working!

Thanks for the help guys, much appreciated :)

One last thing.... is there a way to make the Next and Prev buttons stay there constant so its nice and obvious?
 
Back
Top Bottom