View Full Version : Lightbox fullsize mod for browse page
blimmer
04-30-2006, 01:19 AM
Would anyone be able to help with a modification of se.nsuo.us's Lightbox addon for use in the browse page? ie. clicking on one of the thumbnails in http://photo.blimmer.org/index.php?x=browse will bring up the lightbox
I've contacted se.nsuo.us and upon his suggestion I decided to try asking here.
Cheers and thanks in advance
keoshi
04-30-2006, 01:54 PM
Assuming you're talking about this (http://www.huddletogether.com/projects/lightbox2/) or this (http://www.huddletogether.com/projects/lightbox/) it should be real simple.
1 - edit your index.php and on line 535 replace this:
$thumb_output .= "<a href='$showprefix$id'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
for this:
$thumb_output .= "<a href='$showprefix$id' rel='lightbox'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
2 - Add to your browse_template.html header the following (considering you're using Lightbox JS v2.0 (http://www.huddletogether.com/projects/lightbox2/)):
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
3 - lastly, upload all the files and images of Lightbox zip and double-check paths ;)
blimmer
05-01-2006, 07:33 AM
thanks. i tried it out with a variant of lightbox, thickbox and it brings up the animation and reverts back to the page of the particular image.
that wasnt what i had in mind but i appreciate the help. cheers
keoshi
05-01-2006, 12:50 PM
I didn't try it with pixelpost but I have some experience with this JS and it works very well...
The problem is that it's linking directly to the page, not to the image.
I forgot that minor detail :P
Replace in the original index.php file this:
$thumb_output .= "<a href='$showprefix$id'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
for this:
$thumb_output .= "<a href='images/<IMAGE_NAME>' rel='lightbox'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
Please, bear in mind that the browse page will then be useless to really browse through your pictures. One simple solution would make a second 'browse' page just to this effect.
Cheers
Opa114
06-15-2006, 02:29 PM
Hey!
If done it, like you described it koeshi, but i didn't work. It doesn't load the images when i click on the thumbnails.
http://opa114.pytalhost.de/pixelpost/index.php?x=browse
Joe[y]
06-15-2006, 02:38 PM
you probably want <IMAGE_NAME> to be $image_name
Opa114
06-15-2006, 02:52 PM
i had id changed, but there was nothig other. The same problem.
Where must i upload all the lightbox files? Maybe is the error there ?
Opa114
06-15-2006, 06:20 PM
can nobody help me?
tomyeah
08-13-2006, 08:30 PM
it works with:
$thumb_output .= "<a href='images/$name' rel='lightbox'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
for me. just need to solve the problem with oversized pics somehow.
look here for example (http://pixelcandy.tomyeah.com/index.php?x=browse)
regards, tom (http://tomyeah.com).
Hey!
If done it, like you described it koeshi, but i didn't work. It doesn't load the images when i click on the thumbnails.
http://opa114.pytalhost.de/pixelpost/index.php?x=browse
I tried this and had the same problem you did. The fix is to change the rel='lightbox' to something like rel='lightbox[browse]' where browse can basically be anything you want.
Anyone know how to make this work with v 1.6 ?
Hashishin
06-22-2007, 10:14 PM
Hi,
Simply apply code modification given by tomyeah
$thumb_output .= "<a href='images/$name' rel='lightbox'><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
in your functions_browse file locate in the include folder.
Anyone get this working with 1.7?
Cheers
Ben
www.bengeldreich.com
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.