Page 1 of 1

Lightbox / Thickbox plugin

Posted: Mon Nov 20, 2006 8:20 pm
by NightFire
Hi,

Just installed the lightbox / thickbox plugin. Really a nice mod. Using the lightbox js 2 version on our blog website. Only when you have alot of pictures to show in a kind of gallery you have to close the picture and open a new one.
In the original lightbox js script you could use this fuction:

LightBox version 2 adds the ability to group multiple image links together, so an image gallery is created out of the enlarged images:

Code: Select all

<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>
Any options / ideas to get this trick working for the blog. Tried this code, but it doesn't work. Also the title tag is not working:

Code: Select all

<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
It would be nice if these two features could be activated somehow.

Re: Lightbox / Thickbox plugin

Posted: Tue Nov 21, 2006 9:39 am
by garvinhicking
Hi!

The problem is that serendipity automagically adds "rel='lightbox'" to every image, so if you already have a 'Rel=lightbox' association to it, serendipity simply overwrites it/appends it.

Sadly it would be both hard to code and also performance intense to perform a lookup to see if a "rel" has already been added to a tag so that I don't really want to add this - mostly because other users usually never use custom 'rels' and it would be a large impact on the performance.

The way I see for you would be to always add 'rel=...' manually to your images. Then you don't need the lightbox plugin at all, and you can simply add the javascript output to a HTML Page Nugget or even write it into you rindex.tpl template file...

HTH,
Garvin