I changed my code of the script again, now whenever a user exits the lightbox slideshow, he gets redirected to the page of the image where he stopped.
A few changes are necesarry:
in lightbox_s.js:
Find (line 413):
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
Replace with:
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'), imageLink.getAttribute('picpage')));
Find (line 421):
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
Replace with:
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage')));
Find (line 852):
end: function() {
this.stopSlideShow();
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: 0.2});
showSelectBoxes();
slideshow = saveSlideshow;
foreverLoop = saveForeverLoop;
loopInterval = saveLoopInterval;
slideShowWidth = saveSlideShowWidth;
slideShowHeight = saveSlideShowHeight;
After add:
window.location = imageArray[activeImage][2];
And then in your theme.php file:
Find:
function lightbox_list($picId) {
global $lang_display_image_php;
$i = 0;
$pid = $picId;
$pic_data = get_pic_data($_GET['album'], $pic_count, $album_name, -1, -1, false);
foreach ($pic_data as $picture) {
if($CONFIG['thumb_use']=='ht' && $picture['pheight'] > $CONFIG['picture_width'] ){
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $picture['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
After add:
$picture_page = "./displayimage.php?album=".$picture['aid']."&pos=-".$picture['pid'];
Find:
$picList .= "<a href=\"$picture_url_fullsize\" rel=\"lightbox[list]\"
Replace with:
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\"
Find:
$picList .= "<a href=\"$picture_url_fullsize\" rel=\"lightbox[list]\"
Replace with:
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\"
(above is mentioned twice as you have to change 2 lines that are the same)
That's it.
Enjoy
@zac: It is possible to do so, you just need to edit the lightbox_s.js script to your needs.