PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2006-07-19 12:55:33

robert_h
New member
Registered: 2006-07-19
Posts: 2

Add Lightbox2.0 1.0.0

Code:

##
##
##        Mod title:  Install Lightbox2.0
##
##      Mod version:  1.0.0
##   Works on PunBB:  1.2, 1.2.12
##     Release date:  2006-07-19
##           Author:  Robert_H (robert.holloway@zen.co.uk)
##
##      Description:  This mod adds Lightbox2.0 by Lokhesh Dhakar to punbb forum
##                    [see http://www.huddletogether.com/projects/lightbox2/]
##
##                    You will need to download and install Lightbox from 
##                    the above link.
##
##
##   Affected files:  include/parser.php
##                    header.php
##
##       Affects DB:  No
##
##            Notes:  Tested with Firefox 1.5, Internet Explorer 6.0,
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2006-07-20 00:39:33

quaker
Member
From: Bama,USA
Registered: 2006-02-23
Posts: 968
Website

Re: Add Lightbox2.0 1.0.0

ok what is this function? cause i released a lightbox login and a lightbox register script awhile back..


My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Offline

 

#3 2006-07-21 23:25:01

CowMix
Member
Registered: 2006-05-11
Posts: 13

Re: Add Lightbox2.0 1.0.0

im guessing it provides links to images instead of the images if they are too big, since thats what lightbox2.0 does.

Offline

 

#4 2006-07-24 10:19:59

robert_h
New member
Registered: 2006-07-19
Posts: 2

Re: Add Lightbox2.0 1.0.0

yep, exactly that, the clue's in the "see http://www.huddletogether.com/projects/lightbox2/" smile

if an image is less than 550 pixels width, the image is displayed as is.
if an image is greater than 550 pixes width, the image is displayed resized to 550 pixels width, and clicking on the image invokes lightbox to display the full sized image.

Offline

 

#5 2006-07-24 16:42:44

quaker
Member
From: Bama,USA
Registered: 2006-02-23
Posts: 968
Website

Re: Add Lightbox2.0 1.0.0

another kewl site for lightbox and java stuff
http://www.cssplay.co.uk/menu/index.html
lots of kewl things........

Q


My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Offline

 

#6 2006-08-08 15:04:00

Perkabalo
New member
Registered: 2006-07-15
Posts: 5

Re: Add Lightbox2.0 1.0.0

Code:

##   Affected files:  include/parser.php
##                    header.php

Code:

#
#---------[ 2. OPEN ]----------------------------------------------------------
#

viewtopic.php

#
#---------[ 3. FIND (line:66) ]---------------------------------------------------
#

<link rel="alternate" type="application/rss+xml" href="rss.php" title="New Posts by RSS">

Uhm can't find this one in viewtopic.php? please help smile !

Last edited by Perkabalo (2006-08-08 15:10:26)

Offline

 

#7 2006-08-08 15:14:00

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Add Lightbox2.0 1.0.0

I don't think that's a standard PunBB line wink


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#8 2006-08-08 16:01:29

Perkabalo
New member
Registered: 2006-07-15
Posts: 5

Re: Add Lightbox2.0 1.0.0

Hehe me neither, viewtopic isn't even mentioned in affected files. Yey! big_smile

Offline

 

#9 2006-09-25 21:41:34

twohawks
Member
From: Nevada, USA
Registered: 2006-09-21
Posts: 239

Re: Add Lightbox2.0 1.0.0

Say Robert, could you post some screen shots of what this is supposed to look like in punbb forum? Is this so the administrator (forums host) can create a zone for sharing images?  Examples and/or links to examples would be most helpful.
Cheers,
TwoHawks


TwoHawks
Love is the Function
No Form is the Tool

Offline

 

#10 2006-09-25 23:27:45

glucarelli
Member
Registered: 2006-07-28
Posts: 31

Re: Add Lightbox2.0 1.0.0

After searching ( Elbekko was right it's a non standard PunBB line  ) the mod installed before this is PunSyndicate

Correct modifications are and it works (even with animated images !!! ).

Code:

#
#---------[ 2. OPEN ]----------------------------------------------------------
#

header.php

#
#---------[ 3. FIND (line:65)]-------------------------------------------------
#

<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />


#
#---------[ 4. AFTER, ADD ]---------------------------------------------------
#

<script type="text/javascript" src="lbox/js/prototype.js"></script>
<script type="text/javascript" src="lbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lbox/js/lightbox.js"></script>
<link rel="stylesheet" href="lbox/css/lightbox.css" type="text/css" media="screen" />

Last edited by glucarelli (2006-09-26 00:02:28)

Offline

 

#11 2006-09-26 13:22:55

glucarelli
Member
Registered: 2006-07-28
Posts: 31

Re: Add Lightbox2.0 1.0.0

Is it possible to mix this mod with Image resizing

Offline

 

#12 2006-12-10 14:09:53

yyymin
New member
Registered: 2006-12-09
Posts: 2

Re: Add Lightbox2.0 1.0.0

hello
i'm not good english
i like this mod
i want loading image change
what file edit?
height and width and position loading.gif
thanks read

Offline

 

#13 2007-01-18 17:13:05

trongha
Member
Registered: 2006-05-26
Posts: 42

Re: Add Lightbox2.0 1.0.0

I'm user PunBB 1.2.12

I cant not find code in viewtopic.php and header.php

Code:

<link rel="alternate" type="application/rss+xml" href="rss.php" title="New Posts by RSS">

Please help me!


I'm sorry! I speak english very bad.

Offline

 

#14 2007-03-16 21:49:35

xonek
New member
Registered: 2007-03-16
Posts: 7

Re: Add Lightbox2.0 1.0.0

Hey, for some reason all my images using [img] tag gives the error message, and they are over size 550. even images under 550, gives the error message =/

Anyway to show the image thumbnail in the post?

hmm if URL file-access is disabled (using dreamhost), then this might not work right? since it uses fopen..

Code:

    if (@fclose(@fopen($url, "r")))

Last edited by xonek (2007-03-16 22:26:57)

Offline

 

#15 2007-03-17 18:21:20

ugh
New member
Registered: 2007-03-17
Posts: 2

Re: Add Lightbox2.0 1.0.0

My host (dreamhost) disallows URL file-access, and I am guessing that is why this mod wont work. All [img] tags give the error no matter if its smaller or bigger than 550 width. Even if i use html tag that lightbox uses, it only shows the link not a thumbnail so I am guessing the reason it isn't  creating a thumbnail is cause it is using URL file-access...  Can someone convert this with cURL?


Code:

if (@fclose(@fopen($url, "r")))

Offline

 

#16 2007-10-12 10:06:37

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Add Lightbox2.0 1.0.0

This mod worked perfectly for me, until I changed the server.....
Now I also get the error: Image cannot be loaded

The problem is somewher in here smile  where can I find it?

Code:

    else if (!$is_signature && $pun_user['show_img'] != '0')
    {
        if (@fclose(@fopen($url, "r")))
        {
            $imagehw = GetImageSize($url);
            $width = $imagehw[0];
            $height = $imagehw[1];
            $img_tag = '<img class="postimg" src="'.$url.'" alt="'.htmlspecialchars($url).'" />';
            if ($width > 550)
            {
                $img_tag = '<a href="'.$url.'" rel="lightbox">' . $img_tag . '</a>';
            }
        }
        else
        {
            $img_tag = '<strong>error: image ' . $url . ' cannot be loaded.</strong>';
        }
    }

Offline

 

#17 2007-10-15 19:14:32

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Add Lightbox2.0 1.0.0

Anybody an idea how to fix this?

Offline

 

#18 2007-10-15 19:44:45

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Add Lightbox2.0 1.0.0

..I found this, but I can't get it to work...

http://www.punres.net/viewtopic.php?pid=14944#p14944

Offline

 

#19 2008-01-03 00:28:12

xSDMx
Member
Registered: 2007-12-06
Posts: 25
Website

Re: Add Lightbox2.0 1.0.0

Yeah any ideas?

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.