Currently, I have Lightbox 2 working in the classical way, i.e. a link to an image (in my case it is a script, i.e. photo.php?id=123) with a rel=“lightbox” attribute.
I would like Lightbox to add by itself a parameter to the picture URL, so that photo.php?id=123 becomes for example photo.php?id=123&viewer=lightbox
Again, Lightbox should add the parameter by itself, I do not want to put that parameter in the page from which Lightbox is called.
Is that possible and what part of the lightbox code should I tweak?
It seems that this is the part of the code that you would want to be reworking.
if ((imageLink.rel == 'lightbox')){
// if image is NOT part of a set, add single image to imageArray
this.imageArray.push([imageLink.href, imageLink.title]);
} else {
// if image is part of a set..
this.imageArray =
$$(imageLink.tagName + '[href][rel="' + imageLink.rel + '"]').
collect(function(anchor){ return [anchor.href, anchor.title]; }).
uniq();
while (this.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
}
I have to head off now and cannot do this work for you, but that should help to give someone else a jump-start.