LightBox JS for Fullsize Popup Image - Page 16 LightBox JS for Fullsize Popup Image - Page 16
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

LightBox JS for Fullsize Popup Image

Started by Gizmo, August 29, 2006, 04:06:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Seblon

OK now I found the slideshow.zip file attached. Amazing I didn't see that before since I have been through these threads quite some times now  ::) I'll give this a shot but I guess I will be back with more questions  :)

//Seblon

Seblon

Yes I'm aware of this being an old thread but since there is no core lightbox available I'm willing to take a chance at this one.

Now, what do I do about this existing theme.php part? It seems like it may be here things go wrong? What do I know, I'm not a programmer I'm afraid. Last time I switched the 'function theme_html_picture()' thing, there was database errors...

Thanx

//Seblon


Seblon

Yes probably, but I don't speak one single word German so it didn't give me that much...  ;D But I guess there are other people here that can.

SaWey

I can't help you if you don't tell me what's going wrong.
Read the last summarized walkthrough in this thread and then, if you have some more errors, provide a detailed explanation and a link to your site.

SaWey

Slideshow functionality has move to it's own thread

I recreated this mod to use the latest versions of the javascripts and created a new thread here.
Please look there for the complete instructions, I won't be answering in this thread anymore.

spider666

Hello everybody

I found this thread and I implemented the code to my gallery. Everything is perfect but on the main page I have a big problem, since I add the code It take so much time to open a pictures from the random or the last picture uploaded. I think the reason come from the fact that I have more than 15000 pictures and that the code try count or to load too many pictures.

Without the lightbox I have no problem to open the page.

Any idee how to tweak the code ? to limit the quantity of pictures or so ?

Thanks in advance and sorry for my bad english, I hope you understand my problem

SaWey

Yes, the problem is the amount of pictures, the function get_pic_data will return a giant resultset with those albums.
I can't think of a solution to limit the query on meta albums, a regular limit won't give the expected results. You could add some code to disable the lightbox on those albums?

spider666

Thanks for your answer.

It's not exactely in an album, it's from the homepage of the gallery where I have activated the block "Random images" and "Last uploaded images" and when I open a picure from here, it's like I'm in a huge album showing me the picture I selected (X/15000) with the possibility to go forward till the end of my gallery.

I'm not able to code something to resolve this, so, if someone can help me it will be very appreciated.

Thanks

SaWey

Do you want to disable lightbox on those pages only?

spider666

I don't know the best way to manage lightbox when we have 15000 pictures and a random album + last picture upload on the homepage of the gallery. But yes, maybe it is something to try to desable it on the main page

Gilles50110

Have tested with LightBox 2.04 and Valentines.
When I choose to view the normal image... nothing happen when I click : no lightox effect or popup :(
Under IE (instead of FF3), I notice a javascript error about "builder" not defined.
------
Few minutes later : just installed it with version 2.02 and it works so... not compatible with last version :( . 2.02 version can be downloaded from : http://www.huddletogether.com/projects/lightbox2/releases/
Don't know anyway if this hack is still under developpment or will be included in next cpg 1.5

Thanks for the mod in any case :)

clyde4210

Quote from: SaWey on June 07, 2007, 06:18:49 PM
I don't think anything is wrong in your code, your images are just to small.
When they fit in your page, no lightboxlist is created.

If you always want the lightbox to work, then you have to change some code in the first part of the update:

change:

        if (isset($image_size['reduced'])) {
#################################################
        //First part of lightbox update
        $pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);
        //End of first part
#################################################
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }


to:

#################################################
        //First part of lightbox update
        $pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);
        //End of first part
#################################################


i have used that code but when you click on the thumbnail in the filmstrip it takes you to a random picture instead.

clyde4210

sorry can't edit post but another i can't seem to find where are the directions for getting slide show to work in lightbox. i've downloaded the slideshow.zip do i just replace all lightbox files with these new files?

mmaassen

ty all for the help all posts were usefull got it running in 5 minutes after reading all the posts

tpr

I used the code shown in the 4th page of this topic (seemed to be the last modification) but i recive the following error :
parse error: syntax error, unexpected T_STRING in /home/yehidaco/public_html/gallery/themes/classic/theme.php on line 2323
This is the line right after the added function :

function theme_html_picture() - 2321
{ - 2322
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER; - 2323
    global $album, $comment_date_fmt, $template_display_media;
    global $lang_display_image_php, $lang_picinfo;


Please Advise


Nibbler


tpr

file too large attaching it to the post.
this is the sample theme supplied with coppermine with your code changes (nothing else changed)

Joachim Müller

The file you attached contains loads of illegal characters that certainly trigger a parse error. Seems like you haven't used a proper editor.
Here's a sample of how your code looks like in a decent editor:#################################################

Ê//Second part of lightbox update

Ê

function lightbox_list($picId) {

Ê Ê global $lang_display_image_php;

Notice the row of hash signs? They mustn't be there. Notice the capital E with the accent circumflex? They mustn't be there. Additionally, your editor adds double line breaks. Looks like you used a word processor to edit your PHP files - don't.

SaWey

The hash signs (#) are part of my mod, but the Ê's shouldn't be there.