View Full Version : Lightbox
André Bouwhuis
02-27-2009, 07:10 AM
Hi,
I want to use lightbox for my browsepage. I am using pixelpost 1.7 and I know that there is already some threads about this but that seems to be for older versions
like here
http://www.pixelpost.org/forum/showthread.php?t=5151&highlight=lightbox
because I am not a wiskid with this sort of things I wonder if somebody could help me with this. Thanks in advance
I like to install it on this page:
http://www.andrebouwhuis.nl/index.php?x=browse&pagenum=1
Dennis
02-27-2009, 10:05 AM
Like I said in the Dutch part of the forum: first you need to establish which Lightbox implementation you want to use.
You mentioned in that thread: I don't care, any implementation will do. This is way to general to help you with this. I'm more than willing to help you but I do not have the time to select an implementation, modify the core code (which is probably only an addition to the paged_archive addon) only to hear that you'd rather had something else.
So in conclusion: please say: I want to use THIS implementation, how can I do that? In that case I'll be more than happy to help you with the implementation (or at least give general pointers as my spare time is increasingly diminishing).
Have you tried these posts?
http://www.pixelpost.org/forum/showthread.php?t=8256&highlight=lightbox
André Bouwhuis
02-28-2009, 01:53 PM
I understand what you said about to be more specific about the lightbox i want to use and i did some searching on the net and found this
http://www.lokeshdhakar.com/projects/lightbox2/
this is called lightbox 2 so if you can get me on track with this that would be wonderful.
In the other tread I found this but in version 1.7 (wich I use) I can not finf the row starting with:
$thumb_output .= "<a href=\"$showprefix$id\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
I understand that I would have to replace that line with:
$thumb_output .= "<a href='images/$name' rel='lightbox[views]' title='$title'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
But this code was for pixelpost 1.6
Günter
02-28-2009, 02:38 PM
Open following file with an editor:
includes/functions_browse.php
there is only one line starting with:
$thumb_output .= "<a href
just add to the a-tag:
$thumb_output .= "<a rel=\"lightbox[views]\" title=\"$title\" href
and keep the rest untouched
André Bouwhuis
02-28-2009, 05:47 PM
Hi Günter, thanks for the reply. I have found the line that you say i have to change, this is the full line:
$thumb_output .= "<a href=\"$showprefix$id\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" width=\"$local_width\" height=\"$local_height\" class=\"thumbnails\" /></a>";
What do I have to do? Add a line ore chage it? Sorry but I'am not so good at this things
(I have other qaulitys ;-))
Günter
02-28-2009, 08:25 PM
I just posted it below and you there is detailed info about it on their website: http://www.lokeshdhakar.com/projects/lightbox2/
anyway..
$thumb_output .= "<a href=\"$showprefix$id\" rel=\"lightbox[views]\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" width=\"$local_width\" height=\"$local_height\" class=\"thumbnails\" /></a>";
should most probably do it..
Günter
03-01-2009, 08:25 PM
$thumb_output .= "<a href=\"$showprefix$id\" rel=\"lightbox[views]\" title=\"$title\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" width=\"$local_width\" height=\"$local_height\" class=\"thumbnails\" /></a>";
André Bouwhuis
03-02-2009, 06:16 AM
Hi Günter,
I added the line in the includes/functions_browse.php file and loaded the lightbox files into the root of the pixelpost installation folder and added the following lines in the browse template in the templates folder of dark matter:
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
But nothing happens its not working.
André Bouwhuis
03-02-2009, 11:53 AM
I finally found the solution after a lot of searching. I changed the paged_archive.php
this line
$thumb_output .= "<a href='images/$name'=$id' rel='lightbox' ><img src='".$thumbnail."' alt='".$title."' title='".$title."' width='".$local_width."' height='".$local_height."' class='thumbnails' /></a>";
Its working fine now. The only thing is that its not showing "NEXT" en "PREV" maybay somebody know the answer to that?
Günter
03-02-2009, 04:05 PM
you don't like reading huh?
If you have a set of related images that you would like to group, follow step one but additionally include a group name between square brackets in the rel attribute. For example:
<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>
No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!
e.g.
$thumb_output .= "<a href='images/$name'=$id' rel='lightbox[foobar]' ><img src='".$thumbnail."' alt='".$title."' title='".$title."' width='".$local_width."' height='".$local_height."' class='thumbnails' /></a>";
André Bouwhuis
03-03-2009, 05:58 AM
Thanks a lot Günter for the help.
André Bouwhuis
03-05-2009, 09:06 AM
I have everything working with lightbox and I am very happy with it. Only one last wish: How do I show the image title?
Look here for an example
http://pixelcandy.tomyeah.com/index.php?x=browse
thank you
Problem solved, Thank everybody
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.