View Full Version : Lightbox 2 with PP 1.6 - anyone got it working?
trebor31
04-25-2007, 01:35 AM
Hi
Have just upgraded to PP 1.6 and wanted to include Lightbox 2 as I was using before.
But, the line of code you have to hack in "index.php" is no longer there to hack!!
So, any thoughts or instructions much appreciated.
FYI in PP 1.5 it was this line of code that was changed:
$thumb_output .= "<a href='images/$name' rel='lightbox[views]' title='$title'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
Anyone know what the equivilant is in PP1.6? Or how else to edit the links used by the thumbnails on the browse page?
jaywilliams
04-25-2007, 02:09 AM
Depending on how you have you photoblog setup, one of the entries below should be what you are looking for.
Check out index.php lines:
552 & 553
570 & 571
addons/paged_archive.php line:
337
trebor31
04-25-2007, 03:27 AM
Thanks for the help Jay.
Unfortunately applying the similar hack as used in 1.5 does not work with any of those lines or any combination of them.
Basically, I need the "output" links that the thumbnails use to get to the large image to include the following in them so that the browser fires Lightbox:
rel='lightbox ' title='$title'
any thoughts on how to incorporate this. And should I use 'single quote marks' or "double" ?
Thanks again
austriaka
04-25-2007, 06:19 AM
\includes\functions_browse.php line 87
HTH
KArin
trebor31
04-25-2007, 02:10 PM
Thats the one! Thanks very much KArin.
For anyone else wanting to use Lightbox:
In: \includes\functions_browse.php at line 87 you will find this:
$thumb_output .= "<a href=\"$showprefix$id\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
Change it to this:
$thumb_output .= "<a href='images/$name' rel='lightbox' title='$title'><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
Note, if you just change it to the above line Lightbox will only load a single image - no previous / next links.
Instead, if you want to be able to go to previous and next (for your entire blog) you need to add a grouping tag also, so change the line to this:
$thumb_output .= "<a href='images/$name' rel='lightbox[group]' title='$title'><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
}
Finally this bit: title='$title' is optional - it shows the name of the shot at the bottom of the Lightbox panel. If you do not want this you can remove this part of the tag.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.