forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Visuals => Topic started by: SaWey on January 08, 2008, 01:01:26 am

Title: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 08, 2008, 01:01:26 am
This mod is a fork of LightBox JS for Fullsize Popup Image (http://forum.coppermine-gallery.net/index.php?topic=35539.0),
as I've used a lot of space in that thread and people don't seem to find the right way to implement this mod,
I created this new thread with a new version.

This version uses the following scripts:
prototype 1.4
SWFObject v1.5 (fixes error in FF)
Lightbox v2.03.3 (fixes flash movies showing above slideshow)
  -> lightbox_s is updated to this version and has all earlier features available:


What does it do?
It adds a nice new feature :)
This mod will override the default popup of showing the fullsize picture and it will show a nice Lightbox popup.
It is also a slideshow, you can navigate through the images in the selected album with the arrow keys or with your mouse.

Is there any configuration?
This mod is fine by default, but if you want, you can change some things in lightbox_s.js to suit your needs.
Look for the "Configuration" part in that file, there you can change the following thing:
If you want to add music when playing the slideshow, see this post (http://forum.coppermine-gallery.net/index.php?topic=49596.msg238886#msg238886)

There are some more options, but these are the most important.



The slideshow, by default, only takes the next 10 images in the album, this to prevent overloading big albums.
If you want to change that, you will have to do this in your theme.php function 'lightbox_list()'.
The first line of that function has a variable to set the maximum images for a slideshow.


How do I install it?
- enclosing all contributions of other people -

(Note: attachment and install-guide based on new lightbox/slideshow script contributed in the link on http://www.huddletogether.com/forum/comments.php?DiscussionID=307&page=1#Item_0 (http://www.huddletogether.com/forum/comments.php?DiscussionID=307&page=1#Item_0))

Step 1. Backup your theme folder!

Step 2. If you haven't done already, create a folder called scripts in your gallery root directory.

Step 3. Download slideshow.zip attached (http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=49596.0;attach=16167) to this post

Step 4. Extract the whole slideshow folder into your (newly created) scripts folder.

Step 5. Add this code to the head section of your template.html file:

Code: [Select]
<link rel="stylesheet" href="scripts/slideshow/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>
<script type="text/javascript" src="scripts/slideshow/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/slideshow/js/lightbox_s.js"></script>

Step 6. Paste this code before the ?> at the end of your theme.php file:

Code: [Select]
// Displays a picture
function theme_html_picture()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
    global $album, $comment_date_fmt, $template_display_media;
    global $lang_display_image_php, $lang_picinfo;

    $pid = $CURRENT_PIC_DATA['pid'];
    $pic_title = '';

    if (!isset($USER['liv']) || !is_array($USER['liv'])) {
        $USER['liv'] = array();
    }
    // Add 1 to hit counter
    if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
        add_hit($pid);
        if (count($USER['liv']) > 4) array_shift($USER['liv']);
        array_push($USER['liv'], $pid);
    }

    if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      $condition = true;
    }elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
      $condition = true;
    }elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
      $condition = true;
    }else{
     $condition = false;
    }

    if ($CURRENT_PIC_DATA['title'] != '') {
        $pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
    }
    if ($CURRENT_PIC_DATA['caption'] != '') {
        $pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
    }
    if ($CURRENT_PIC_DATA['keywords'] != '') {
        $pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
    }

    if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
        template_extract_block($template_display_media, 'img_desc');
    } else {
        if (!$CURRENT_PIC_DATA['title']) {
            template_extract_block($template_display_media, 'title');
        }
        if (!$CURRENT_PIC_DATA['caption']) {
            template_extract_block($template_display_media, 'caption');
        }
    }

    $CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';

    if ($CONFIG['make_intermediate'] && $condition ) {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
    } else {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    }

    $image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);

    $pic_title = '';
    $mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);


    if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {

        if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
            $CURRENT_PIC_DATA['pwidth']  = 320; // Default width

            // Set default height; if file is a movie
            if ($mime_content['content']=='movie') {
                $CURRENT_PIC_DATA['pheight'] = 240; // Default height
            }
        }

        $ctrl_offset['mov']=15;
        $ctrl_offset['wmv']=45;
        $ctrl_offset['swf']=0;
        $ctrl_offset['rm']=0;
        $ctrl_offset_default=45;
        $ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
        $image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
    }

    if ($mime_content['content']=='image') {
        if (isset($image_size['reduced'])) {
#################################################
        //First part of lightbox update
$pic_html = lightbox_list($CURRENT_PIC_DATA);
//End of first part
#################################################
        } else {
$pic_html = lightbox_list($CURRENT_PIC_DATA);
        //    $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }
    } elseif ($mime_content['content']=='document') {
        $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
    } else {
        $autostart = ($CONFIG['media_autostart']) ? ('true'):('false');

        $players['WMP'] = array('id' => 'MediaPlayer',
                                'clsid' => 'classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" ',
                                'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
                                'mime' => 'type="application/x-mplayer2" ',
                               );
        $players['RMP'] = array('id' => 'RealPlayer',
                                'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
                                'codebase' => '',
                                'mime' => 'type="audio/x-pn-realaudio-plugin" '
                               );
        $players['QT']  = array('id' => 'QuickTime',
                                'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
                                'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
                                'mime' => 'type="video/x-quicktime" '
                               );
        $players['SWF'] = array('id' => 'SWFlash',
                                'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
                                'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
                                'mime' => 'type="application/x-shockwave-flash" '
                               );
        $players['UNK'] = array('id' => 'DefaultPlayer',
                                'clsid' => '',
                                'codebase' => '',
                                'mime' => ''
                               );

        if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
            $user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
        } else {
            $user_player = $mime_content['player'];
        }

                // There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
        }

        $player = $players[$user_player];

        $pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
        $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        $pic_html .= "</object><br />\n";
    }

    $CURRENT_PIC_DATA['html'] = $pic_html;
    $CURRENT_PIC_DATA['header'] = '';
    $CURRENT_PIC_DATA['footer'] = '';

    $CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);

    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

    return template_eval($template_display_media, $params);
}

#################################################
 //Second part of lightbox update
 
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################
    global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = empty($_GET['album']) ? $picId['aid'] : $_GET['album'];
$pic_data = get_pic_data($aid, $pic_count, $album_name, -1, -1, false);
$imax = 0; //counter
$max = $max/2;
foreach ($pic_data as $picture){
if ($picture['pid'] == $pid) {
//the number of the picture in  order
$picnumber = $imax;
}
$imax++;
}
//Check beginning and ending of album
if(! ($max == ((-1)/2))){
if ($imax > $max){
if ($picnumber < $max || $picnumber == 0){
$down = 0;
$up = 0 + ($max*2);
}elseif (($picnumber + $max) > $imax){
$down = $imax - ($max*2);
$up = $imax;
}else{
$down = $picnumber - $max;
$up = $picnumber + $max;
}
}else{
$down = 0;
$up = $imax;
}
}else{
$down = 0;
$up = $imax;
}

$pic_already_shown = false; //fix to remove duplicate entries
foreach ($pic_data as $picture) {
if ($i >= $down && $i <= $up){
if($CONFIG['thumb_use']=='ht' && $picture['pheight'] > $CONFIG['picture_width'] ){
  $condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $picture['pwidth'] > $CONFIG['picture_width']){
  $condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']){
  $condition = true;
}else{
$condition = false;
}
$picture_page = "./displayimage.php?album=".$picture['aid']."&pos=-".$picture['pid'];
if (is_image($picture['filename'])) {
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($picture, 'normal');
} else {
$picture_url = get_pic_url($picture, 'fullsize');
}
$picture_url_fullsize = get_pic_url($picture, 'fullsize');
$pic_title = ($picture['title'] ? $picture['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($picture['filename'])), "_", " "));
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries

}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
}
}
$i++;
}
return $picList;
}//End of second part
#################################################

Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.

I don't know if this is a bug or not, doesn't cause problems on its own.

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() LIMIT $limit2";

change to

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";

Step 8. Upload

Step 9. Relax  8)





Some premature error handling:
If this thing won't work, please look at these possible solutions first:

1. -Be absolutly certain the paths to the scripts are right!

maybe you put in the code:
Code: [Select]
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>

When actualy you putted the file in:
Code: [Select]
<script type="text/javascript" src="scripts/js/prototype.js"></script>

2. -The navigation images aren't showing up?

in 'css/lightbox.css' be sure the following lines are correct:
Code: [Select]
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }

and in 'js/lightbox_s.js':
Code: [Select]
var path_to_images = "scripts/slideshow/images/"; //path to your images





Changelog:

11/13/2008:
- Added internationalization.
- Added download link option + download image option.
01/19/2008:
- Fixed to not show duplicate images on 'Last Comments' album.
- Fixed proper working of fixed image size.





Final point: This mod goes unsupported!
This mod should work as is, so please follow the instructions as good as possible.
If something goes wrong, read the instructions again.

When you ask for support in this thread, don't expect a fast answer by me, I'm very busy atm.


Enjoy the mod, and if you have something to contribute, please do so.


Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on January 08, 2008, 08:11:23 am
Demo link please - would like to see it in all its brilliance, as well as see what happens to image ratings and comments.

Thanks
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 08, 2008, 09:07:42 am
I don't have a demo online, will have to wait a bit.
It doesn't include ratings nor comments, those stay on the regular pages.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Pieter.txt on January 08, 2008, 07:33:11 pm
Demo link please - would like to see it in all its brilliance, as well as see what happens to image ratings and comments.

Thanks
See this Blog-post: http://www.tihass.de/74-coppermine-fullsize-slideshow.html
For those who don't understand German: click on the link "Galerie" below the last step.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on January 08, 2008, 07:50:49 pm
thanks - that does look really nice!
any chance of having someone routed to the image showing in the slideshow when ever it is clicked?  that way the viewer can post a comment, rating or view picture details if interested.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 09, 2008, 11:00:57 pm
it actualy does what you request, when you exit the slideshow, you are redirected to the page of the last picture seen.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on January 09, 2008, 11:30:59 pm
great - i haven't been able to get there becuase my images are too big for the screen and roll off - so the closing "x" can't be seen.  Tried to adapt the js so that it limits the size of the popup - but couldn't.
The previous version is attached if anyone would like to take a crack.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: wwwebguru on January 10, 2008, 06:35:25 am
Great Mod guys...thanks! Works awesome except I noticed one hitch after installing it.

The Resize Thumbnail/Images Utility in the Admin Tools doesn't work. Because my images where so large (off the screen) I had to delete and reload instead of resizing with the utility. Any ideas?

Thanks again!!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Obelix on January 11, 2008, 01:04:35 am
Extra info for point 7.
Quote
Step 7. Making sure the random images are shown:
these changes are in file include/functions.inc.php.
I tried to looking for that string in file mentioned in 6.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 12, 2008, 12:17:54 am
Thanks for noticing, changed it in my post.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: adi4x on January 12, 2008, 08:03:32 am
I was looking to install a simmilar addon called ThickBox http://jquery.com/demo/thickbox/
Since this one worked very good ...

Many Thank's

Adrian Toma
www.tomasphotos.com
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on January 12, 2008, 07:30:09 pm
what was changed...?

Quote
Thanks for noticing, changed it in my post.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 12, 2008, 08:35:48 pm
look in the post above that post...
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: adi4x on January 12, 2008, 08:47:28 pm
If someone knows how to add music with this script please let me know

Im trying to add this
http://tomasphotos.com/scripts/music/song.mp3
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 12, 2008, 11:36:28 pm
That's easy, but it has a bug in firefox -> when new pic shows, the music restarts.
Anyway, here's the change:


Replace this:
Code: [Select]
if ($picture['pid'] == $pid) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";

}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}


With this:
Code: [Select]
if ($picture['pid'] == $pid) {
$picList .= "<a href=\"$picture_url_fullsize\" music=\"http://tomasphotos.com/scripts/music/song.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";

}else{
$picList .= "<a href=\"$picture_url_fullsize\" music=\"http://tomasphotos.com/scripts/music/song.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on January 13, 2008, 07:46:36 am
I'm have installed Lightbox v2.03.3 and love it.  However I am using lightbox.js v2.02 with the Mod so that the size of the popup images is a fixed size (uplaoded files are typically larger than the screen).

Does using lightbox.js v2.02 with Lightbox v2.03.3 stop any functions?

If so, will there be a lightbox.js v2.03.3 coming out that limits the size of the popup window?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: adi4x on January 13, 2008, 10:13:23 am
That's easy, but it has a bug in firefox -> when new pic shows, the music restarts.
Anyway, here's the change:
...

Still not working (music not playing and slideshow play button disabled)
but ive decided to play the music from and external plugin source
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 13, 2008, 09:49:41 pm
I'm have installed Lightbox v2.03.3 and love it.  However I am using lightbox.js v2.02 with the Mod so that the size of the popup images is a fixed size (uplaoded files are typically larger than the screen).

Does using lightbox.js v2.02 with Lightbox v2.03.3 stop any functions?

If so, will there be a lightbox.js v2.03.3 coming out that limits the size of the popup window?

The 2.03.3 fixes some minor bugs, so you won't miss any important features. though this version has some premodified things that were developed in the old thread (like redirect on exit...)
I will do the fixed size in the future, need to find some time first.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: .andrew on January 15, 2008, 04:13:17 pm
Could you please make an lite version, withouth the slideshow, so it will only dislay that image, not the entire album on a slideshow.thanks :D
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 15, 2008, 04:38:04 pm
You better use the other one then: LightBox JS for Fullsize Popup Image (http://forum.coppermine-gallery.net/index.php?topic=35539.0)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: .andrew on January 15, 2008, 05:14:02 pm
But that topic is like 100 yrs ago, and I can't find some clear instrctions for the current version of lightbox.Anyway, thanks.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 15, 2008, 05:50:27 pm
If I have time, after some improvements, I'll look into it.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: deve on January 16, 2008, 09:51:39 am
I am sure there is somewhere to add some lines to make the pictures open in same sizes if a picture is about 2080xblabla anything so that it opens up all pictures in same size like 1024x768 or anything ?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 19, 2008, 10:25:22 am
Better will be if the image size is more than the screen size, the image to be 100% width :D
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 19, 2008, 10:57:01 am
I tested it with a plain cgp installed, and it works fine, but with joomla bridge there is some problem.
I think it is because of the theme of joomla, is that possible? And how to repair it ?
When clicking on images only a white box is shown with picture dimensions.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Smylo on January 19, 2008, 01:54:02 pm
Hallo all,

i have a little problem, all looks absolute fantastic but if there are more than one comments to a picture the preview pictures appears as many comments there are...
example:
1 comment -> 1 preview pic
2 comments -> 2 preview pics
and so on...

this will only happen if you come from the "newest comments"-section, if you are navigating to the image manually (by using the categories and so on) the thumb only appears once...
Its very strange  ???

I hope someone can help...

Thanks in advance
Smylo
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 19, 2008, 10:14:54 pm
I am sure there is somewhere to add some lines to make the pictures open in same sizes if a picture is about 2080xblabla anything so that it opens up all pictures in same size like 1024x768 or anything ?

Fixed this in the new version, see first post.
To configure the fixed size, you will need to modify lightbox_s.js and change:

Code: [Select]
//--- Slideshow options
var slideShowWidth = -1; // -1 size slideshow window based on each image
var slideShowHeight = -1; // -1 size slideshow window based on each image



I tested it with a plain cgp installed, and it works fine, but with joomla bridge there is some problem.
I think it is because of the theme of joomla, is that possible? And how to repair it ?
When clicking on images only a white box is shown with picture dimensions.

Can you give a link to your gallery please, I cannot see what's wrong if I can't see your gallery



Hallo all,

i have a little problem, all looks absolute fantastic but if there are more than one comments to a picture the preview pictures appears as many comments there are...
example:
1 comment -> 1 preview pic
2 comments -> 2 preview pics
and so on...

this will only happen if you come from the "newest comments"-section, if you are navigating to the image manually (by using the categories and so on) the thumb only appears once...
Its very strange  ???

I hope someone can help...

Thanks in advance
Smylo

Fixed in new version, see first post.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 21, 2008, 11:18:28 pm
The gallery is here
http://vip07.uni.cc/g/
There is one more bad effect: It seams that the picture appears under some other pictures from the site
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 12:04:07 am
I even can't see the picture in lightbox?
Can you please explain your problem a little better.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 22, 2008, 12:07:43 am
everything is applied as you say
Yes , no picture is seen,
If I set this mod to clear gallery, it works fine, but in here, WHITE screen
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 06:27:44 am
I don't know exectly what is wrong,
but looking at you gallery, there are some possibilities:

You have added the link to the required scripts twice, probably once in your Joomla theme, and once in cpg theme or so?
You are also using mootools, could be a conflict between those two -> try looking here (http://www.huddletogether.com/forum/search.php?PostBackAction=Search&Keywords=mootools&Type=Comments&btnSubmit=Search)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: kamicasse on January 22, 2008, 09:28:49 am
i would like to show the images in their own original size... but dont know what to change??
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: kamicasse on January 22, 2008, 09:36:44 am
what i actually wanted to say, is that i have some vertical pictures and it  will show them smaller than it own orginal size... why is that ?

var slideShowHeight = -1;   // -1 size slideshow window based on each image

isnt that the correct value?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 10:30:48 am
You are right, but the latest lightbox is set to always resize the image if it doesn't fit in the browser.
The picture will show a little smaller then the browser size.

You can disable this by setting the option:
Code: [Select]
var resize = 1;// Set 0 to disable auto-resizing
in lightbox_s.js
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 22, 2008, 04:29:46 pm
Please can you give me some advise how to make the mod working with site with mootools
I read that I have to change the Lightbox with Slimbox. Some info how to do what?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 05:20:08 pm
No idea,
Try this (http://forum.coppermine-gallery.net/index.php?topic=35539.msg218909#msg218909) or try searching the forum for some other mod.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 22, 2008, 05:25:27 pm
and the two new files slimboc.css and slimbox.js
from where to get them
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 22, 2008, 05:47:13 pm
Strange things goes around
Now I just added http://vip07.uni.cc/g/ before the URLs of .js and .css
and when clicking on the picture, in same window opens just the picture, no effects

PS. Where is the edit post button?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 06:29:23 pm
You get that because the script isn't initialized, try adding
Code: [Select]
onLoad="initLightbox();" to the body tag of your template.

You will not find the edit button, as it is disabled for regular users.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 22, 2008, 06:39:49 pm
with onLoad="initLightbox();"
dosen't work too
say how to change the Lightbox with slimbox
to try that way
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 22, 2008, 11:20:31 pm
As I told you, you'll have to figure that out for yourself, as I haven't used slimbox before.
I don't have the time to look into that.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: eK3eKyToPa on January 24, 2008, 10:48:15 am
OK, now it works fine, with slimbox,
looks just the same way
But is there any way this to work with 'External Images Links / Use "remote" storage servers'
I tried but nothing figured out.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: olti on January 25, 2008, 03:52:04 pm
My CPG is integrated with Joomla and when I try to install this mod I get a blank page. I think is something wrong with theme.php because when i replace this file with the original one the problem is gone and the mod doesn't work. Pls if you can take a look at me theme.php
Thanks.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Nibbler on January 25, 2008, 04:01:57 pm
You have theme_html_picture() in there twice.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: olti on January 26, 2008, 12:39:42 am
Thanks Nibler.
Removed that code but the problem still remains.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Nibbler on January 26, 2008, 01:00:02 am
When I remove that code the file is fine. Maybe you have plugins interfering. Try disabling them temporarily.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 26, 2008, 01:38:19 am
There have been problems with Joomla integrations before,
Like Nibbler said, double check if no other mod/plugin is interfering with this one.
Most problems like this occur when using some javascript framework like mootools,
if this is the case, the solution might already be in this thread.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: LauriN on February 07, 2008, 01:59:30 am
I don't know why, but I can't download your script. I get the error message "An Error Has Occurred!
You are not allowed to access this section" :(
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 07, 2008, 02:06:44 am
The file linked to the wrong attachment, fixed it, please try again.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: LauriN on February 07, 2008, 10:43:19 am
Thanks, now everything works! :)

I've just installed your script and have to say that it is great! I've just found a minor "bug", but maybe it is a bug of Lightbox itself. If I view my pictures with Firefox, they do not get displayed in Fullsize, but slightly resized which makes them look a little bit "grainy". With Opera they are displayed correctly (I'm using Linux and can't test it with IE at the moment). You can view my gallery here: http://reitterer.net/gallery/

BTW: I've bridged Joomla and Coppermine too using the bridge http://www.mehdiplugins.com/misc/index.htm and everything seems to work fine with the Coppermine Lightbox script so far. :)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 07, 2008, 11:26:17 am
It's a lightbox thing, look at this post (http://forum.coppermine-gallery.net/index.php?topic=49596.msg240140#msg240140) how to disable the auto resizing.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: LauriN on February 07, 2008, 11:36:08 am
Thanks! I should have read the thread more carefully. :)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: hell on March 01, 2008, 04:01:32 pm
I have an error

Fatal error: Cannot redeclare theme_html_picture() (previously declared in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php:37) in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php on line 396
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 01, 2008, 09:51:35 pm
The theme you are using already has some of the content you had to paste in your theme.php, you'll have to change it manually.
Look at the differences of the function theme_html_picture() in 'include/theme.inc.php' and the one you have pasted in your theme.php.
The remove the theme_html_picture() function you pasted in your theme.php, look for that existing function and only add the differences you noticed.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: hell on March 02, 2008, 02:31:06 am
Then:

Code: [Select]
Parse error: syntax error, unexpected '}' in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php on line 206
Line 206

Code: [Select]
return template_eval($template_display_media, $params);  204
}  205
         } else {  206
$pic_html = lightbox_list($CURRENT_PIC_DATA);
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 02, 2008, 12:02:30 pm
Can you post your theme.php, that'll be easier
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: hell on March 02, 2008, 03:53:22 pm
OK

Thank You
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 02, 2008, 04:51:13 pm
I changed your theme.php, download and replace your theme.php
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: HighlanderICT on March 05, 2008, 06:24:10 pm
installed this as per instructions and it seems to be correct but when clicking on an image i go from an error free page to one where firebug just scrolls infinitely with the attached error ... please help.

Setup
Joomla 1.5.1
CPG 1.4.16
Mehdi's Bridge

Installed Plugins
Final_Extract v2.2     
File to Album mover v0.1   
Name CPGMassImport v2.0

Attachments
error.gif - copyof firebug screen
theme.php - basically a copy of the one from waterdrop theme but with edits for this mod.



			
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 05, 2008, 06:52:42 pm
A link to your site would be easier
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: HighlanderICT on March 05, 2008, 07:51:49 pm
PM sent.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 05, 2008, 08:13:00 pm
I see you also use mootools, there have been others with problems when using that library, try looking here:
http://www.huddletogether.com/forum/search.php?PostBackAction=Search&Keywords=mootools&Type=Comments&btnSubmit=Search
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: HighlanderICT on March 05, 2008, 08:20:44 pm
yeah, its built into Joomla. thanks for the link, will investigate.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: ganeshcp on March 17, 2008, 01:20:12 pm
I have two problems with this mode :(

One is that my random and last additions are not working when clicked on. It asks if I want to download the displayimage file!!
http://gallery2.vluvshahrukh.com/

Another is that when I close the LightBox overlay popup..the intermediate page reloads for no reason (at least in firefox)
http://gallery2.vluvshahrukh.com/displayimage.php?album=829&pos=-17828

Does anyone know why this is happening  :-\

I first inserted the code into theme.php but then transferred it to themes.inc.php. Having same trouble with both.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: ganeshcp on March 17, 2008, 01:50:47 pm
I have realized that this problem only lies with the theme_html_picture function specified in this mod.

Where as it works fine with the original function:

Code: [Select]
function theme_html_picture()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
    global $album, $comment_date_fmt, $template_display_media;
    global $lang_display_image_php, $lang_picinfo;

    $pid = $CURRENT_PIC_DATA['pid'];
    $pic_title = '';

    if (!isset($USER['liv']) || !is_array($USER['liv'])) {
        $USER['liv'] = array();
    }
    // Add 1 to hit counter
    if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
        add_hit($pid);
        if (count($USER['liv']) > 4) array_shift($USER['liv']);
        array_push($USER['liv'], $pid);
    }

    if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      $condition = true;
    }elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
      $condition = true;
    }elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
      $condition = true;
    }else{
     $condition = false;
    }

    if ($CURRENT_PIC_DATA['title'] != '') {
        $pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
    }
    if ($CURRENT_PIC_DATA['caption'] != '') {
        $pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
    }
    if ($CURRENT_PIC_DATA['keywords'] != '') {
        $pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
    }

    if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
        template_extract_block($template_display_media, 'img_desc');
    } else {
        if (!$CURRENT_PIC_DATA['title']) {
            template_extract_block($template_display_media, 'title');
        }
        if (!$CURRENT_PIC_DATA['caption']) {
            template_extract_block($template_display_media, 'caption');
        }
    }

    $CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';

    if ($CONFIG['make_intermediate'] && $condition ) {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
    } else {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    }

    $image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);

    $pic_title = '';
    $mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);


    if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {

        if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
            $CURRENT_PIC_DATA['pwidth']  = 320; // Default width

            // Set default height; if file is a movie
            if ($mime_content['content']=='movie') {
                $CURRENT_PIC_DATA['pheight'] = 240; // Default height
            }
        }

        $ctrl_offset['mov']=15;
        $ctrl_offset['wmv']=45;
        $ctrl_offset['swf']=0;
        $ctrl_offset['rm']=0;
        $ctrl_offset_default=45;
        $ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
        $image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
    }

    if ($mime_content['content']=='image') {
        if (isset($image_size['reduced'])) {
            $winsizeX = $CURRENT_PIC_DATA['pwidth']+5;  //the +'s are the mysterious FF and IE paddings
            $winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }
    } elseif ($mime_content['content']=='document') {
        $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
    } else {
        $autostart = ($CONFIG['media_autostart']) ? ('true'):('false');

        $players['WMP'] = array('id' => 'MediaPlayer',
                                'clsid' => 'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ',
                                'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ',
                                'mime' => 'type="application/x-mplayer2" ',
                               );
        $players['RMP'] = array('id' => 'RealPlayer',
                                'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
                                'codebase' => '',
                                'mime' => 'type="audio/x-pn-realaudio-plugin" '
                               );
        $players['QT']  = array('id' => 'QuickTime',
                                'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
                                'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
                                'mime' => 'type="video/x-quicktime" '
                               );
        $players['SWF'] = array('id' => 'SWFlash',
                                'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
                                'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
                                'mime' => 'type="application/x-shockwave-flash" '
                               );
        $players['UNK'] = array('id' => 'DefaultPlayer',
                                'clsid' => '',
                                'codebase' => '',
                                'mime' => ''
                               );

        if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
            $user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
        } else {
            $user_player = $mime_content['player'];
        }

                // There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
        }

        $player = $players[$user_player];

        $pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
        $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        $pic_html .= "</object><br />\n";
    }

    $CURRENT_PIC_DATA['html'] = $pic_html;
    $CURRENT_PIC_DATA['header'] = '';
    $CURRENT_PIC_DATA['footer'] = '';

    $CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
    include ("pic_top.php");
    include ("pic_left.php");
    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        '{top_pane}' => $pic_top,
        '{bottom_pane}' => $pic_left,
        '{link_units}' => $link_units,
        '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

    return template_eval($template_display_media, $params);
}
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 17, 2008, 03:28:57 pm
Of cource it works with the original function, pointless to post that function here.
You'd better post your customized theme.php. (Never edit themes.inc.php, also pointless)

I tried looking at your site, but only see an error when going to the intermediate pics.

The reloading is a feature of the slideshow, it is a redirect to the picture you last saw on the slideshow.

Do you have any other mods installed?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: osckar on April 07, 2008, 11:34:43 pm
Hi:

This mod works well with the latest coppermine release (1.4.16) but I have a question:

1.- say for ex, Im viewing an image with the slideshow, it says: Image 6 of 11. I click on next and it says Image 7 of 11 ... but when reaches the 11 of 11 you cant go further.. like if no more images were left.

how to increase the max number of images in order to view all the images within an album instead of only 11?

Thank you!

Oscar
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 08, 2008, 11:58:33 am
You can easily do that by changing the number as indicated:

Code: [Select]
#################################################
 //Second part of lightbox update
 
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Gephri on April 10, 2008, 08:10:43 pm
How can I update Lightbox to increase the view counts when an image is viewed in a slideshow?  That will give me a more accurate count of actual views.
thanks
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 10, 2008, 09:47:47 pm
You'll have to use some kind of custom ajax function.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: osckar on April 10, 2008, 11:54:56 pm
You can easily do that by changing the number as indicated:

Code: [Select]
#################################################
 //Second part of lightbox update
 
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################

Thank you!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Shemo on April 17, 2008, 03:30:03 am
Is this working for 1.4.18 because I cannot get it to work and I've looked over the code about 4 times.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 17, 2008, 12:31:27 pm
1.4.18 works like every other version. What is the problem?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Elguerrero on April 18, 2008, 08:41:01 pm
Hello, just wanted to say that its really a nice mod for coppermine. (i´ve been using Lightroom galleries for a couple of month).
Like always trying new galleries, but in the end ill always end up with coppermine  :)

I wanted to ask if its posible (disabling the intermediate picture) and use the Lightbox slideshow feature directly from the album list view.

Thanks in advance
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 18, 2008, 11:49:36 pm
Try the search button, I know it's somewhere on these forums.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: dereckmartin on May 03, 2008, 07:46:36 am
This mod breaks RCMenu Plugin so it no longer works.  Is there a way to have both?  I am using 1.4.19 (stable).
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: masksmaster on May 05, 2008, 05:10:02 pm
I've noticed that upgrading the LightBox JS scripts to most current v2.04 would result is the sideshow not working.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on May 05, 2008, 10:18:16 pm
That is because the standard lightbox script isn't capable of showing a slideshow.
You need to use the custom one attached to the first post, or convert the 2.04 version to have the custom functions built in.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: masksmaster on May 06, 2008, 06:49:46 pm
Thank you!
I was just wondering, because it seems like Firefox didn't like the bottom part where the title is displayed. IE shows it with white background, FF doesn't. And from the sample of 2.04 I could tell that FF displays it properly. And thank you again!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on May 06, 2008, 10:00:42 pm
I'll look and see what I can do
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: imgr8 on June 21, 2008, 05:45:53 am
I installed it and the slideshow works fine but when I click on the thumbnail on the main page to go to the image page, it shows the full-sized image instead of the _normal pic. I understand that when you upload a pic..there is a thumbnail image created along with a _normal and then a full size pic. Is it the lightbox error or something else? I got this error after I installed the mod though.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: ronronmx on June 21, 2008, 05:53:46 am
Sorry if this is a stupid question, but could you use the same procedure to install the highslide script instead of lightbox? If not, has there been any explanations on how to use highslide for the full size image popup?

thx...

Stephane
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Joachim Müller on June 23, 2008, 08:29:20 am
Keep issues that are related to another mod to the thread that deals with that particular mod. We don't allow cross-postings nor thread drift, especially on announcement threads.

Issues related to the Highlside mod are not meant to go into the lightbox mod thread and vice versa.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: phatair on June 30, 2008, 07:17:00 pm
Hi,
i installed the lightbox and it works perfectly - thanks a lot.

But i have one question - is it possible that lightbox show my pictures in the original size. It looks like that the image with lightbox is a little bit smaller than the original?

Thanks a lot.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: phatair on June 30, 2008, 07:46:46 pm
Sorry - no option to edit my topic.

i forget the info: i made the change in the lightbox_s.js file "var resize = 0;// Set 0 to disable auto-resizing" but the image is smaller than the original :(
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: alligator on July 05, 2008, 11:39:15 pm

Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.
What exactly does this mean?

The random images are shown on my startpage, but when I click them I just get a white page.
The links on the random images look like
Code: [Select]
...cpg/displayimage.php?album=random&cat=0&pos=-5776When using an unmodified theme the links look the same, but I can click them. So the problem should be somewhere in the theme modification, but I'm using only standard themes which come with CPG 1.4.18.

and btw: Thanks for the excellent work. :)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: alligator on July 06, 2008, 03:44:07 pm
The problem exists only when the logged in user has access to too many pictures.
If he has only access to less than ~4000 pictures the links on the random pics work as usual.

If he has access to more than ~4000 pictures, clicking the random pics leads to a white page.

The problem is independent of $max being 10, 1000 or -1.
Code: [Select]
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)

What can I do, since the random pics are the most enjoyed feature of the users?
(The webserver is mine, dualcore, 2GB RAM and high script runtime.)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: alligator on July 06, 2008, 05:55:39 pm
Ok and here is the solution:

Please be careful, since I do not know PHP and MySQL
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: alligator on July 06, 2008, 06:07:16 pm
Ok and here is the solution:

Please be careful, since I do not know PHP and MySQL

Change case 'random' in functions.inc.php

Code: [Select]
        case 'random': // Random pictures
                if ($META_ALBUM_SET && $CURRENT_CAT_NAME) {
                        $album_name = $lang_meta_album_names['random'].' - '. $CURRENT_CAT_NAME;
                } else {
                        $album_name = $lang_meta_album_names['random'];
                }

                $query = "SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET";
                $result = cpg_db_query($query);
                $nbEnr = mysql_fetch_array($result);
                $pic_count = $nbEnr[0];
                mysql_free_result($result);

                //if($select_columns != '*') $select_columns .= ', aid, owner_id, owner_name';
                $select_columns = '*'; //allows building any data into any thumbnail caption
                // if we have more than 1000 pictures, we limit the number of picture returned
                // by the SELECT statement as ORDER BY RAND() is time consuming
  //                              /* Commented out due to image not found bug
                if ($pic_count > 3000) {

$max_picture_id = 10000;
$i0 = rand(0, $max_picture_id);
$i1 = rand(0, $max_picture_id);
$i2 = rand(0, $max_picture_id);
$i3 = rand(0, $max_picture_id);
$i4 = rand(0, $max_picture_id);
$i5 = rand(0, $max_picture_id);
$i6 = rand(0, $max_picture_id);
$i7 = rand(0, $max_picture_id);
$i8 = rand(0, $max_picture_id);
$i9 = rand(0, $max_picture_id);
$i10 = rand(0, $max_picture_id);
$i11 = rand(0, $max_picture_id);
$i12 = rand(0, $max_picture_id);
$i13 = rand(0, $max_picture_id);
$i14 = rand(0, $max_picture_id);
$i15 = rand(0, $max_picture_id);
$i16 = rand(0, $max_picture_id);
$i17 = rand(0, $max_picture_id);
$i18 = rand(0, $max_picture_id);
$i19 = rand(0, $max_picture_id);
$i20 = rand(0, $max_picture_id);
$i21 = rand(0, $max_picture_id);
$i22 = rand(0, $max_picture_id);
$i23 = rand(0, $max_picture_id);
$i24 = rand(0, $max_picture_id);
$i25 = rand(0, $max_picture_id);
$i26 = rand(0, $max_picture_id);
$i27 = rand(0, $max_picture_id);
$i28 = rand(0, $max_picture_id);
$i29 = rand(0, $max_picture_id);
$i30 = rand(0, $max_picture_id);


                        $result = cpg_db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE (pid = $i0 OR pid = $i1 OR pid = $i2 OR pid = $i3 OR pid = $i4 OR
pid = $i5 OR pid = $i6 OR pid = $i7 OR pid = $i8 OR pid = $i9 OR pid = $i10 OR pid = $i11 OR pid = $i12 OR pid = $i13 OR pid = $i14 OR
pid = $i15 OR pid = $i16 OR pid = $i17 OR pid = $i18 OR pid = $i19 OR pid = $i20 OR pid = $i21 OR pid = $i22 OR pid = $i23 OR pid = $i24 OR
pid = $i25 OR pid = $i26 OR pid = $i27 OR pid = $i28 OR pid = $i29 OR pid = $i30) AND approved = 'YES' $ALBUM_SET ORDER BY RAND() $limit");
                } else {
                $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";
                $result = cpg_db_query($query);
      }
                $rowset = array();
                while($row = mysql_fetch_array($result)){
                        $rowset[-$row['pid']] = $row;
                }
                mysql_free_result($result);

                if ($set_caption) build_caption($rowset);

                $rowset = CPGPluginAPI::filter('thumb_caption_random',$rowset);

                return $rowset;
                break;


It works perfectly for me, it has only the disadvantage, that I hardcoded the max pid in the code
Code: [Select]
$max_picture_id = 10000; Currently I have only 7000 pictures, so I made it a bit higher and took 30 random numbers when only needing 12. Otherwise the chosen random pids might not be existant and in that case there would be less random pictures displayed.

I'm sure there is a easy way of getting the max pid with a SQL request out of the database. Feel free to tell me  ::)

Can somebody please fix this issue for CPG1.4.19 or 1.5?

One last thing remains:
When I click a random image I'm forwarded to the page with the intermediate image, only the intermediate image does not show. I need to klick it again from the film strip below, then it appears and I can click it to enter the lightbox. Can anybody help? ???
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on August 25, 2008, 10:37:42 pm
Ive added the part with the music in theme.php like this

Code: [Select]
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" music=\"/music/nocturne.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries

}else{
$picList .= "<a href=\"$picture_url_fullsize\" music=\"/music/nocturne.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}

and its not working... all slideshow disabled now... any idea why??  ;)

http://hmr6dobl2ii0.az.pl/shop/
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on August 27, 2008, 08:08:33 pm
*bump*
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on August 27, 2008, 11:25:52 pm
somebody forgot to mention that including the script for player is needed in template.html

AFTER
Code: [Select]
<link rel="stylesheet" href="scripts/slideshow/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>
<script type="text/javascript" src="scripts/slideshow/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/slideshow/js/lightbox_s.js"></script>

ADD
Code: [Select]
<script type="text/javascript" src="scripts/slideshow/js/swfobject.js"></script>
however... the slideshow is working, the player is showed, the music is not playing in either FF3 or IE7... suggestions?? ideas?? please??

I've tested the whole code separately and the music is playing, in the lightbox slideshow is not...

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on August 28, 2008, 11:41:57 am
Try setting the correct path to the mp3 file

Change
../scripts/slideshow/music/song.mp3

To
scripts/slideshow/music/song.mp3
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on August 28, 2008, 09:30:00 pm
did that, wasnt working... installed the whole thing again and its working... no idea what was fu**** up... thx for help though
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on September 06, 2008, 06:46:12 pm
me again  ;)

in Lightbox v2.02 there was something like this for the music

Code: [Select]
if (firstTime == 1) {
                  //firstTime = 0;
  new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }),
  new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ],
{ duration: 0.65, afterFinish: function() { myLightbox.updateNav();} }
  );                   
} else {
  //this code was commented out because it causes the music player to restart in Firefox
//   new Effect.Parallel(
// [ new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ],
// { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} }
//   );
  myLightbox.updateNav();
}

in Lightbox v2.03.3, you have this on the other hand

Code: [Select]
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }),
  new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ],
{ duration: resizeDuration, afterFinish: function() {
// update overlay size and update nav
var arrayPageSize = getPageSize();
Element.setHeight('overlay', arrayPageSize[1]);
myLightbox.updateNav();
}
}
);

and it probably makes the music restart now... I tried to fix it however I know too less of this mod to do it... would you lend me a hand??
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on September 06, 2008, 09:52:55 pm
No, the music has always restarted in FF, no idea how to fix that.
The part that has changed has been replaced to another function (updateNav)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on September 08, 2008, 12:12:07 am
Well I disabled it for the time being cause I use FF3 however I'm pretty sure I had the music working in Firefox with the 2.02 version though the key navigation wasn't working for me, that's why I had to reinstall to 2.03... the code I pointed out in the 2 versions is the only significant diffrence for this problem, I found... did u Sawey write the 2.02 as well?? cause this part
Code: [Select]
//this code was commented out because it causes the music player to restart in Firefoxclearly states that there is a fix for music in Firefox, but thats just me  ;) I'm too noob in this stuff to figure it out, however u might... cheers!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: efekt on September 12, 2008, 07:36:58 am
maybe lets brainstorm or something  ;)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: JoeF on September 22, 2008, 05:09:28 am
Is there a way to show the lightbox overlay when the slideshow button is pressed?
I tried calling theme_html_picture() in theme_slideshow(), but that just gives me an empty page.
TIA
-Joe
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: JoeF on September 29, 2008, 07:38:34 am
Answering my own question...
I changed my theme.php file, copying the template_img_navbar from include/themes.inc.php, and changed this line to add a {SLIDESHOW_PARMS} value:
Code: [Select]
<a href="{SLIDESHOW_TGT}" {SLIDESHOW_PARMS} class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
And then copying theme_html_img_nav_menu, and modyfing $slideshow_tgt and adding a new value $slideshow_parms:
Code: [Select]
//    $slideshow_tgt = "{$_SERVER['PHP_SELF']}?album=$album$cat_link$uid_link&amp;pid=$pid&a
mp;slideshow=".$CONFIG['slideshow_interval'];
    $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    $slideshow_tgt = $picture_url;
    $slideshow_parms = "rel=\"lightbox[list]\"";

    $pic_pos = sprintf($lang_img_nav_bar['pic_pos'], $human_pos, $pic_count);

    if (defined('THEME_HAS_NAVBAR_GRAPHICS')) {
            $location= $THEME_DIR;
        } else {
            $location= '';
        }

    $params = array('{THUMB_TGT}' => $thumb_tgt,
        '{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],
        '{PIC_INFO_TITLE}' => $lang_img_nav_bar['pic_info_title'],
        '{SLIDESHOW_TGT}' => $slideshow_tgt,
        '{SLIDESHOW_PARMS}' => $slideshow_parms,
        '{SLIDESHOW_TITLE}' => $lang_img_nav_bar['slideshow_title'],
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on September 29, 2008, 01:13:01 pm
Thanks for the addition JoeF!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 10, 2008, 08:28:03 am
I've got this installed on my sites gallery and it is working except for one thing, in FF when the image pops up, there is no option in right click to save the image to wherever.

So my question is, is there a way to fix this and or make a download icon in the window for the image to be downloaded?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 10, 2008, 08:31:41 am
It might help someone if I put my web address, wouldn't it?

www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Joachim Müller on November 10, 2008, 09:36:30 am
Fix your other issues first: your full-size pics are too large for the browser. Additionally, you have a db issue - when accessing http://www.laura-bertram.com/gallery/displayimage.php?album=random&cat=0&pos=-127 I get There was an error while processing a database query
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 10, 2008, 06:44:19 pm
Ok, i fixed the random issue, I also changed the resize function to 1 for auto resize. However what happens now is that the lightbox window is resized and the image rolls off the side and bottom. Now this actually (in an ugly looking way) fixes the download issue so that you can right click on the image that is hanging out to download it.

I guess my next question is, is there a way to make lightbox resize the image without me having to change the actual images and add a download button for the larger image?

Re sizing the the full size images is out of the question since they are for desktop backgrounds.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 11, 2008, 06:36:59 pm
This mod works great. There does seem to be on problem though.

When you exit the slideshow via the escape key, the browser does not load the last image viewed. It just closes the slideshow.  This doesn't make much sense to me, b/c it appears to be calling the end function which is suppose to load the most recent image.

Code: [Select]
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
myLightbox.end();

Code: [Select]
end: function() {
this.stopSlideShow();
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: overlayDuration});
showSelectBoxes();
showFlash();

slideshow = saveSlideshow;
foreverLoop = saveForeverLoop;
loopInterval = saveLoopInterval;

slideShowWidth = saveSlideShowWidth;
slideShowHeight = saveSlideShowHeight;

if(go_to_last_image_on_exit && imageArray[activeImage][2] != null){
window.location = imageArray[activeImage][2];
}
[/end]
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 13, 2008, 07:18:33 am
Poke ;-)

Ok, i fixed the random issue, I also changed the resize function to 1 for auto resize. However what happens now is that the lightbox window is resized and the image rolls off the side and bottom. Now this actually (in an ugly looking way) fixes the download issue so that you can right click on the image that is hanging out to download it.

I guess my next question is, is there a way to make lightbox resize the image without me having to change the actual images and add a download button for the larger image?

Re sizing the the full size images is out of the question since they are for desktop backgrounds.

Still waiting for some help on this.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 03:31:20 pm
Poke ;-)

Still waiting for some help on this.

I've looked at your gallery and I had the exact same issue on my gallery but I've since resolved it.  Many of my pictures are 3872x2592 and the lightbox script auto-resizes them when displaying them.  My problem was caused from not properly reading the directions. I had initially placed the /scripts/slideshow folder in my template directory. I fixed the problem by moving the folder to my /CPG (the root directory for my Coppermine).  Maybe you made the same mistake I did.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 13, 2008, 04:43:43 pm
This is truly an awesome mod. It works great, I even added the replacement for the slideshow button. However some questions;

- I would like to have two slideshow buttons, one pointing to the old version and one to the enhanced one, since there still people not having javascript enabled or not having the player installed (of security reasons). Any idea's on that?

- Also I don't use Title and/or comments etc. How can I disable this, since now it shows the filenames, which I dont want.

- I also tried the music bit, but it didnt work, perhaps the mp3 is too big ?? I guess it needs to be loaded aswell.

Any help appreciated

Cath
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 13, 2008, 07:28:41 pm
I've looked at your gallery and I had the exact same issue on my gallery but I've since resolved it.  Many of my pictures are 3872x2592 and the lightbox script auto-resizes them when displaying them.  My problem was caused from not properly reading the directions. I had initially placed the /scripts/slideshow folder in my template directory. I fixed the problem by moving the folder to my /CPG (the root directory for my Coppermine).  Maybe you made the same mistake I did.

Thanks for answering,

I have my folders inside the root directory as was specified in the instructions. (/gallery/scripts/slideshow/)

What is interesting is that the lightbox window is resized but the image does not resize and hangs over the edges. The other more important issue is the fact that in FF users can't right click and "save the image as" to download it. I would prefer to fix the second issue first and then worry about the overhang issue later. ;-)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 08:22:56 pm
FF users can right click to download, but you have to exit the slideshow mode.  If you right click the intermediate picture and "click open link in new tab", it will open the full size picture in a new tab which can be saved.

Not a graceful solution, but it's better than nothing.

I tried this (http://www.huddletogether.com/forum/comments.php?DiscussionID=474&page=1#Item_0) and didn't have any luck. But maybe it will work for you.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 09:15:25 pm
Scratch my previous post. The code supplied on the other link does work. I just didn't realize this mod doesn't use the latest version of lightbox.

Open lightbox_s.js and replace:
Code: [Select]
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
With:
Code: [Select]
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length + "<br><a target=_blank href=" + imageArray[activeImage][0] + ">Click here to save a version of this image</a>");
}
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 13, 2008, 09:17:29 pm
This mod works great. There does seem to be on problem though.

When you exit the slideshow via the escape key, the browser does not load the last image viewed. It just closes the slideshow.  This doesn't make much sense to me, b/c it appears to be calling the end function which is suppose to load the most recent image.

It should be working, as it works on my gallery. I can't help you as I can't access your gallery.




Poke ;-)

Still waiting for some help on this.

You should not edit the style of the lightbox script, only if you know what you're doing.
delete the folowing lines from your style2.css:
Code: [Select]
#lightbox img {
height:auto;
width:auto;
}
The rightclick "Save As" won't work, as the script creates a mask in front of the image to allow for navigation to the next and previous images,
you'll have to come up with a solution yourself.
P.S.: You won't be able to do this in IE as well




This is truly an awesome mod. It works great, I even added the replacement for the slideshow button. However some questions;

- I would like to have two slideshow buttons, one pointing to the old version and one to the enhanced one, since there still people not having javascript enabled or not having the player installed (of security reasons). Any idea's on that?

- Also I don't use Title and/or comments etc. How can I disable this, since now it shows the filenames, which I dont want.

- I also tried the music bit, but it didnt work, perhaps the mp3 is too big ?? I guess it needs to be loaded aswell.

Any help appreciated

Cath

To have 2 slideshow options, undo the changes you made to enable the lightbox slideshow with the slideshow button.
Then, if you already have $template_img_navbar template, replace it with the one below
(if you don't have it yet, just paste it in your theme somewhere at the top)
This way, people who have javascript enabled will see the lightbox slideshow, and people who don't have it, will see the regular slideshow.
[edit:] I added an 'id' tag to the slideshow link as well as a little javascript, please replace your copy with this one

Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" rel="lightbox[list]" id="slideshow_link" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
<script type="text/javascript">
window.onload = function(){
var images = document.getElementsByTagName('img');
for(i = 0; i < images.length; i++){
if(images[i].className == 'image'){
$('slideshow_link').setAttribute('href', images[i].src);
break;
}
}
}
</script>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;

To remove the title, don't insert the title in the link.
You can do this by editing the second part of the lightbox update in your theme.php:

FIND:
Code: [Select]
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries

}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}

REPLACE WITH:
Code: [Select]
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" >";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries

}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" ></a>\n";
}
The music should be preloading in the background, but it still has issues in FF. I wouldn't spend to much time on that rather put a player in your theme or so.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 13, 2008, 09:20:46 pm
Scratch my previous post. The code supplied on the other link does work. I just didn't realize this mod doesn't use the latest version of lightbox.

Open lightbox_s.js and replace:
Code: [Select]
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
With:
Code: [Select]
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length + "<br><a target=_blank href=" + imageArray[activeImage][0] + ">Click here to save a version of this image</a>");
}

Great solution, hadn't thought about that (though it is super logic :) )
I'm going to add it to my script as an option.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 09:25:46 pm
I wish I could take credit. Unfortunately, I'm better with Google than I am with coding (other than C).
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 09:50:29 pm
It should be working, as it works on my gallery. I can't help you as I can't access your gallery.




You can now with this information.

My Gallery (http://www.loopfamily.net/CPG)

username: testuser
password: testuser

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 13, 2008, 10:24:23 pm
I hadn't read that it only happens when using the escape button,

I guess this is a browser limitation:
-> you hit escape during the slideshow
-> javascript tells browser to move to next page
-> because escape is pressed, this action is canceled

you can close the lightbox with other buttons as well ('x', 'o' and 'c')
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on November 13, 2008, 10:42:09 pm
Is there is another javascript command associated with the escape key, aside from the one I posted?

Because the code I posted shows that the escape key calls the same function as clicking on the x.

Either way, it's probably not a big enough concern to worry about finding the source of the problem.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 13, 2008, 10:48:43 pm
The only thing I can say is what I wrote in the post above.

by pressing escape you actually cancel the action invoked by pressing it.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 15, 2008, 07:23:24 am
Thanks guys, that worked  :)

http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)

http://www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 16, 2008, 06:36:19 pm
To have 2 slideshow options, undo the changes you made to enable the lightbox slideshow with the slideshow button.
Then, if you already have $template_img_navbar template, replace it with the one below
(if you don't have it yet, just paste it in your theme somewhere at the top)
This way, people who have javascript enabled will see the lightbox slideshow, and people who don't have it, will see the regular slideshow.

Ok the title remove works great.

To have 2 slideshow options, I got error message about report file button, but added those line from the themes.inc.php

When NOT logged in I get error message upon clicking the foto to get intermediate... :
Code: [Select]
Template error
Failed to find block 'ecard_button'(#(<!-- BEGIN ecard_button -->)(.*?)(<!-- END ecard_button -->)#s) in :

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="images/folder.gif" width="16" height="16" align="absmiddle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="javascript:;" class="navmenu_pic" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" rel="lightbox[list]" title="{SLIDESHOW_TITLE}"><img src="images/slideshow.gif" width="16" height="16" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" witdh="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="images/report.gif" border="0" align="absmiddle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/prev.gif" width="16" height="16" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/next.gif" width="16" height="16" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

I take it has something to do with the function disabling the ecard function since When logged in that doesnt happen since the e-card button is now present and the intermediate picture is presented.
Upon clicking the foto the Lightbox function works as useall since I have Java working.

BUT upon clicking the slideshow button i get a small starting box with image circling but nothing happens, upon clicking this you get returned..... ?????
so its not quite working (I havent tried without java since i have to find first how to disable this)

This is the site: http://www.fotofantastic.nl

By the way, I saw with debug on following message:
/themes/rainy_day/theme.php

    * Notice line 279: Undefined variable: picList
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 16, 2008, 08:30:33 pm
Ok, I have the template error fixed, it was only needed to add the lines <!-- BEGIN ecard_button --> <!-- END ecard_button --> into the theme.php at the part of the menu_bar.

But the Slideshow button still gives a problem.

Thanks in advance
Greetz Cath

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 16, 2008, 09:55:15 pm
Sorry for the Template error, I used an old template for that, I have updated the code in my previous post.

I'm also updating the instructions for the correct link, I made a mistake in that on as well :)
[edit:] I edited the instructions.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 17, 2008, 09:39:32 pm
Sorry for the Template error, I used an old template for that, I have updated the code in my previous post.

I'm also updating the instructions for the correct link, I made a mistake in that on as well :)
[edit:] I edited the instructions.

Thanks, that worked great, the only thing I see since I removed the title, sometimes it just shows just like 1 from 7, and other times it says slideshow and on the next line 1 from 7. Nothing problematic, just strange that it is on/off.

Is it also possible to disable the one when clicking on the photo, since now with the slideshow button I dont see the need for it, without disrupting the system offcourse.

And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 18, 2008, 12:28:08 pm
Hi there I noticed some other strange behaviour from the lightshow when used through the slideshow button, it opens the first picture in intermediate format, then when you click play, it reloads the first picture in bigger format (the way it should have been in the first place), this also means that in my case instead of 7 pictures, it states there are 8 pictures.....

When clicked on the picture it opens the lightshow inmidiatly with the bigger format. So there is a difference in operating.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on November 18, 2008, 02:23:33 pm
Thanks, that worked great, the only thing I see since I removed the title, sometimes it just shows just like 1 from 7, and other times it says slideshow and on the next line 1 from 7. Nothing problematic, just strange that it is on/off.

Is it also possible to disable the one when clicking on the photo, since now with the slideshow button I dont see the need for it, without disrupting the system offcourse.

And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...



Let me rephrase this post; I want to use the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html)
It creates a empty image with the picture so that the picture itself is somewhat protected to unauthorized copying (both on intermediate and full picture level). However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate. The showing of the full picture would in that case also somewhat protected I guess, but the intermediate is not protected.
If there is no solution I would have to revert to something else for either one of them.

And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on November 26, 2008, 08:52:03 am
Ok guys, now that I've got it working, thanks alot on that by the way. I have a question. I know the slideshow won't work with videos, however, one my galleries has some video catagories and I was wondering if there was a way to turn off the slideshow in those catagories? I noticed that the videos weren't working so I disabled the slideshow for now until someone comes up with an idea. (If possible)

you can check out that gallery here; http://www.tardis1916.com/dragoncon/index.php (http://www.tardis1916.com/dragoncon/index.php)

I know this might be a mind bender so I offer a heartfelt thanks and I have a bottle of asprin for those who need it ;-)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: dcb0284 on November 30, 2008, 08:38:00 am
I implemented this a while ago but did not realize my count was not working correctly.  When you click on a image that isn't the first image to view in lightbox it starts the count over so the images will start over in the slide show.  For example if I'm on image 50 of 100 it will start back over at 1 instead of going to 51 when I click next.  Since our gallery is private just ask and I will set you up a user and send the user info and url in pm.  I would appreciate any help though.  I have been trying to trouble shoot this myself and have not been able to correct it.  I didn't see anyone else having this problem.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on November 30, 2008, 11:31:22 am
Go ahead, send me the info so I can take a look.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: MikeFL on December 18, 2008, 11:40:14 pm
I tried this mod, read all the pages, and found someone touched on this issue, but I could not locate an answer.

I just installed Coppermine (latest release) after using Gallery2 for a year.  I have it in a subdirectory for testing purposes.  I am using the i3theme (Midnight).  I modified the files according to this thread - I hope.

Here's the problem...

When at the home page, there are thumbnails for "Random Files" and "Last Additions".  If I click any of the thumbnails, I get the following:  "Critical error
There was an error while processing a database query".

I get this error from the home page thumbnails and when clicking on the thumbnails on any of the category "Random Files" and "Last Additions".  However, when I click to go to album and view the album images, those thumbnails work fine.

The URLs that do not work seem to all have "...?album=random..." or "...?album=lastup..." in them.

Any ideas? 

Help is appreciated.  Thank you!
Mike

(test installation)  http://www.thephotositook.com/cpg
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: MikeFL on December 18, 2008, 11:50:55 pm
I can't edit my previous post?

Update:  I went to another thread to install the lightbox (lightbox JS for fullsize image) without the slideshow.  It works fine.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Cath22 on December 19, 2008, 03:15:44 pm
Is there no answer to this one?

Is it also possible to disable the lightbox one when clicking on the intermediate photo, since now it works with the slideshow button. I would like to use on the intermediate the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html).
However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate.
Please let me know if there is or is no solution.

Thanks
Cath
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: RoCkR on January 07, 2009, 02:24:48 am
Hello and thanks for mod is very very good, and it is a option to integrate in next versions of cpg, but i have a problem  :(

Is there no answer to this one?

Is it also possible to disable the lightbox one when clicking on the intermediate photo, since now it works with the slideshow button. I would like to use on the intermediate the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html).
However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate.
Please let me know if there is or is no solution.

Thanks
Cath

I have the same problem, but i doesn't use the stramm mod (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html)), i used the RC Menu plugin (http://forum.coppermine-gallery.net/index.php/topic,33377.0.html (http://forum.coppermine-gallery.net/index.php/topic,33377.0.html)), and the full-size access plugin, these two last aren't working... (site: http://www.macarenissima.com/galeria/ (http://www.macarenissima.com/galeria/)).

Thanks for reply and happy new year!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 07, 2009, 11:16:52 am
I don't have an answer for your question as I dropped development of this plugin. I am working on a new one for the next version of Coppermine that will be much easier to configure and do all the things you want.

You'll have to have a little patience...
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: RoCkR on January 07, 2009, 07:46:42 pm
I don't have an answer for your question as I dropped development of this plugin. I am working on a new one for the next version of Coppermine that will be much easier to configure and do all the things you want.

You'll have to have a little patience...
Sugestion: Please use SexyLightBox, (link (http://www.coders.me/web-html-js-css/javascript/sexy-lightbox-2)) a clone, sexier and more lightweight, the classic Lightbox. It was built thinking of the web designers, easy to install and use.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on January 07, 2009, 08:10:22 pm
I'm currently coding my own port to jQuery, which will be lightweight, but can grow when needed as well.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: nmdilipsimha on February 01, 2009, 07:48:20 am
Thanks for this excellent tool. I successfully saw the full screen slideshow on my coppermine gallery.
But after some time, the slide show feature is not working!

I have attached my theme.php and template.html.

My gallery: http://dilip.nijagal.com/photo_gallery/thumbnails.php?album=5
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: nmdilipsimha on February 01, 2009, 08:02:09 am
I just replaced the lighbox_s.js file with original copy and it started working again.
In the diff, I found no changes though!

I have another issue:
Slideshow is very slow. It keeps loading for a long time.
Any bug there?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 01, 2009, 10:17:54 pm
@nmdilipsimha:
The slow loading probably is because the full size images take some time to load, try loading one (i.e. http://dilip.nijagal.com/photo_gallery/albums/mumbai_trip/malshej/DSC06107.JPG) in your browser and you'll see what I mean.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Pascal YAP on February 01, 2009, 10:23:26 pm
Yes Sander.
Probably some Cumulo-Nimbus (CuMb) (clouds  ;D )
Very heavy and dangerous clouds  ;)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on February 17, 2009, 05:27:07 pm
Hi
does anybody know why if I start a slideshow in one of my albums, it always shows photos from 1 to 11 and then it ends?
See at http://www.flapane.com/gallery/
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 17, 2009, 09:26:48 pm
Please read the instructions more carefully, it is explained in there:

The slideshow, by default, only takes the next 10 images in the album, this to prevent overloading big albums.
If you want to change that, you will have to do this in your theme.php function 'lightbox_list()'.
The first line of that function has a variable to set the maximum images for a slideshow.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on February 17, 2009, 09:38:06 pm
My bad, I don't know how I didn't see that piece of the guide.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: low-deluxe on February 25, 2009, 12:53:33 pm
I installed your mod. I have Cpg integrated with mehdi Plugin with Joomla.
When i click on a picture lightbox opens and seems to work, but the lightbox screen is white!?
What is wrong?

Link: bar-racuda.de/fotos

thanks for helping and providing such a beautyful mod.

Greets
Low-deluxe
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 25, 2009, 01:36:16 pm
I think the problems is that you are using mootools, jquery and prototype all together.
I don't know how to fix your problem, it might be better to use something like highslide or so (for which a CPG mod is available as well), as it is already loaded on your page.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: low-deluxe on February 25, 2009, 01:49:48 pm
well actually i don`t think i am using this kind of stuff... !?
I didn`t install it...
Couldn't it be something else?
Greets

low-deluxe
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: low-deluxe on February 25, 2009, 02:04:49 pm
ah well. I installed another picture gallery which is still running, because i can`t get coppermine the way i like it ;-)

Would deinstall it help?

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on February 25, 2009, 03:35:21 pm
No it won't.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on March 02, 2009, 08:51:47 pm
Does the photos gets their view counter increased while one is watching them trough lightbox?
I can't verify as visits from my ip aren't counted.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on March 06, 2009, 01:09:26 pm
ne1? :)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 06, 2009, 08:15:33 pm
No, links aren't counted with lightbox slideshow
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on March 08, 2009, 12:00:18 pm
Ah, ok. Do you think it will be implemented one day?
thanks
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 08, 2009, 11:35:56 pm
Yes, but not in the CPG1.4 version
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: chickchick on March 16, 2009, 04:17:37 pm
quick and dirty hack to count views at lightbox

first u need to edit lightbox_s.js
add this function after the global vars near line 140-150
Code: [Select]
function download_counter(id){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }

  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById("target").innerHTML=xmlHttp.responseText;
      }
    }

  xmlHttp.open("POST", "addHit.php", false);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
  xmlHttp.send('pid='+id);
  }

find "showImage: function()" and add patch it like this:
from:
Code: [Select]
this.preloadNeighborImages();
to:
Code: [Select]
this.preloadNeighborImages();
download_counter(imageArray[activeImage][3]);

next find this:
Code: [Select]
for (var i=0; i<anchors.length; i++){
                                var anchor = anchors[i];
                                if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
                                        imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage')));
and patch it like this:
Code: [Select]
for (var i=0; i<anchors.length; i++){
                                var anchor = anchors[i];
                                if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
                                        imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage'), anchor.getAttribute('pid')));

now u have to patch your theme.php:
find:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\" >";
and replace with:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" pid=\"$picture[pid]\" title=\"$pic_title\" >";

comments are welcome
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: chickchick on March 16, 2009, 04:26:00 pm
sry one file is missing and cant find the mod/edit button.

you need to create a file called "addHit.php" in your cpg dir.

Code: [Select]
<?php
define
('IN_COPPERMINE'true);

require(
'include/init.inc.php');

if (isset(
$_POST['pid'])) {
  
// Add 1 to hit counter
  
$pid = (int)$_POST['pid'];
  if (isset(
$_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
      
add_hit($pid);
      if (
count($USER['liv']) > 4array_shift($USER['liv']);
      
array_push($USER['liv'], $pid);
      
user_save_profile();
  }
}
?>

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: the6thday on March 29, 2009, 06:56:30 pm
hi,

just a note:

Quote
Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.

Quote from: Nibbler on January 28, 2007, 08:43:13 PM
I don't know if this is a bug or not, doesn't cause problems on its own.

Code:

$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() LIMIT $limit2";


change to

Code:

$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";


this has changed in 1.4.21! you can still replace the existing code with the "change to" code but you have to remove these two lines instead of just one.

Code: [Select]
                $limit_random = $limit2 ? 'LIMIT '.$limit2 : '';
                $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 29, 2009, 10:32:02 pm
Thanks for the note
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on March 31, 2009, 11:27:36 am
Hello all!

I installed this great tool on all my galleries and it's been working great! I have run into one issue and that is the text below an image is the same color as the background. Where in the css do I change the font color to black?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on March 31, 2009, 01:21:50 pm
can you give a url to your website?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on March 31, 2009, 10:42:54 pm
LOL, that would have helped, wouldn't it?

http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)

&

http://www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 01, 2009, 06:52:07 pm
It is your main stylesheet what is forcing the white color on the texts, you can prevent this by editing lightbox.css:

in #imageDataContainer, add:
color: #000000;

also add a new class:
#imageDataContainer a{
/*add the style for links in here*/
}
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: tardis1916 on April 02, 2009, 06:28:57 am
Thanks so much! I knew it was something with my site CSS but couldn't figrue out how to fix it.  ;D

Now for another question, this one is more complicated and I'm not sure it would be possible but if you look at one of my images withen the gallery, I have 4 sometimes 5 or 6 different sizes of an image for different size resolutions. I have links withen the file information for the different sizes but wonder if it would be possible to have different sizes added to the popup where it says, click here to download this size, and beneath that another link for the next size and so forth?

ie, instead of just saying, "Click here to save a version of this image" have it say

Click here to save a 1920x1080 of this image
Click here to save a 1920x1200 of this image
Click here to save a 1600x1200 of this image
Click here to save a 1280x1024 of this image
Click here to save a iphone version of this image

and have the links actually point to the actual images. I personally think that would require codeing each image which if you can see, i have lots of images.

http://www.laura-bertram.com/gallery/index.php (http://www.laura-bertram.com/gallery/index.php) & http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on April 02, 2009, 08:57:47 am
It certainly is possible, but I don't have the time to do this for you. If you know javascript, then you should look at line 661
(you will have to pass all the links from your pic info via php to javascript)
If you can't do it yourself, try the freelancers board.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 06, 2009, 08:00:50 pm
sry one file is missing and cant find the mod/edit button.

you need to create a file called "addHit.php" in your cpg dir.

Code: [Select]
<?php
define
('IN_COPPERMINE'true);

require(
'include/init.inc.php');

if (isset(
$_POST['pid'])) {
  
// Add 1 to hit counter
  
$pid = (int)$_POST['pid'];
  if (isset(
$_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
      
add_hit($pid);
      if (
count($USER['liv']) > 4array_shift($USER['liv']);
      
array_push($USER['liv'], $pid);
      
user_save_profile();
  }
}
?>


Hi
I have just read your pm!
Thanks I have did the mod, even if I still don't know if it works, I have to wait some visitor to see my photos and then check if the counter get increased, as I as an admin can't increase my visit counter.

What does the js lightbox dev think? Did you or other users try it?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on April 07, 2009, 02:48:10 am
I've tried it too. However, my site is a small family site and like you, I cannot test this myself. I have no idea how people view the pictures on my site, so I can't tell where the hits are coming from.  I suppose I can go to a wi-fi hotspot and test the mod out.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 10:57:02 am
I must say that when I wrote that post, I wrote down the number of gallery visits, and it was 19706.
Now it is 19770, but either people used lightbox or not, I don't know... I suppose we should try a reciprocal test on our websites.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 12:41:55 pm
Firefox 2 has just been crashed and it keeps crashing if you open lightbox photos picking them from RANDOM IMAGES.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 07, 2009, 02:23:42 pm
chickchick mod does work, tested on my own site.
A few edits are required if you want to use addHit.php file from this mod (http://forum.coppermine-gallery.net/index.php/topic,9262.msg104242.html#msg104242), which adds standard slideshow views to hit counter: change
Code: [Select]
 xmlHttp.open("POST", "addHit.php", false);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
to
Code: [Select]
 xmlHttp.open("GET", "addHit.php", false);
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 07, 2009, 02:36:59 pm
you can still replace the existing code with the "change to" code but you have to remove these two lines instead of just one.

Code: [Select]
                $limit_random = $limit2 ? 'LIMIT '.$limit2 : '';
                $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
Just change
Code: [Select]
$limit_random = $limit2 ? 'LIMIT '.$limit2 : '';to
Code: [Select]
$limit_random = $limit2 ? 'LIMIT '.$limit2 : $limit;No more edit needed.
Sawey please review step 7 in installation instructions accordingly.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 03:37:34 pm
So you don't confirm the bug?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 07, 2009, 04:29:31 pm
What bug?  ???
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 04:30:16 pm
« Reply #166 on: Today at 12:41:55 PM »
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 07, 2009, 04:34:44 pm
No issue with random images slideshow in Opera 9.64. I'm running 1.4.20 patched, not 1.4.21
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 04:57:21 pm
mmmh got it. Please could you see if it works on my gallery too? It could be Firefox and I can't test other browsers atm, but it sounds strange.
It doesn't happen if you slide album images but only if you pick images from RANDOM section.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 07, 2009, 06:46:18 pm
Tried with Firefox 2.0 and yes, it freezes.
I'm going to test it after having removed chickchick's mod.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 07, 2009, 07:44:31 pm
Thanks for your help, I hope chikchick sees my pm and reads our posts.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: vidmas on April 10, 2009, 05:36:50 am
Hi, may somebody know why in my Lightbox slideshow the bottom starts first and only then
picture popup. Its not so nicely to view. :(
http://vidmas.xz.lt/

sorry with my poor english :)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Ludo on April 10, 2009, 07:23:36 pm
I'm going to test it after having removed chickchick's mod.
Without the mod, no issue with random pctures slideshow. There must be a reason and I must find it  ;D ;)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: flapane on April 11, 2009, 05:38:20 pm
ok meanwhile I'd better stick to the original lightbox mod ;D
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: jeepguy_1980 on April 12, 2009, 05:13:29 pm
I've converted this mod into a plugin.  Right now, it can only be customized by editing the codebase.php file. I hope to release a future version with a menu based configuration.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Joachim Müller on April 13, 2009, 09:53:51 am
Please start a separate standalone thread on the plugin board with your plugin announcement. A moderator will move it accordingly. Here in this thread online the mod flavor should be discussed, as we're trying to keep mods and plugins separated.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: crvh on June 04, 2009, 09:08:02 pm
Woo hoo!! Thanks for the mod, I have just switched to Coppermine and REALLY wanted to figure out how to make lightbox work.  I tried some other manuel fixes but not having a lot of time to trouble shoot, this one worked FIRST TIME!yay! :D
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: donsenilo on July 05, 2009, 11:39:39 pm
hello

some prob with slideshow and slider.

i've wrote in the slideshow-thread:
"when i click on a pic in the slider i get an database-error (Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten).
i use the slideshow-mod, not enlargeit. could this be the problem ?"

and i get this answer: "This thread is about the plugin, not the mod. Go to the mod thread."

so i would be very happy if someone could help with this and don't say, i should "go" somewhere else  :-\

thx.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: donsenilo on July 05, 2009, 11:41:57 pm
sorry ... i mean "slider-thread" ... it's late ...

hello

some prob with slideshow and slider.

i've wrote in the slideshow-thread:
"when i click on a pic in the slider i get an database-error (Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten).
i use the slideshow-mod, not enlargeit. could this be the problem ?"

and i get this answer: "This thread is about the plugin, not the mod. Go to the mod thread."

so i would be very happy if someone could help with this and don't say, i should "go" somewhere else  :-\

thx.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: SaWey on July 18, 2009, 01:11:48 pm
I have no idea what slider you are using, can you give a link to your gallery?
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: donsenilo on July 18, 2009, 02:08:54 pm
I have no idea what slider you are using, can you give a link to your gallery?
hello

this is the slider i use: http://forum.coppermine-gallery.net/index.php/topic,51324.0.html (http://forum.coppermine-gallery.net/index.php/topic,51324.0.html)

and this is my site: http://www.hasnobrain.com/cpg14x/index.php (http://www.hasnobrain.com/cpg14x/index.php)

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: donsenilo on July 22, 2009, 01:00:42 pm
hello again

problem solved !

it was the "old" random problem:

I found this to solve the problem and now it works:

In your file include/functions.inc.php find
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";

Change to:
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";

Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: phatair on August 04, 2009, 05:49:48 pm
Hi,
first of all - thanks a lot for this great modification!!
But i have one problem - all pictures that i show with this lightbox are much more darker then the original picutre. is there any parameter where i can change this?
You can have a look here/url]

I hope somebody can help me.
best regards (http://phatair.bplaced.net/evol-eno/gallery/thumbnails.php?album=35)
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: phatair on August 04, 2009, 06:02:57 pm
Hm...ok this problem is only with FireFox on my desktop PC. With IE on my desktop PC all is fine and on my notebook its ok on the firefox, too. So i dont know what this is ...
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: pie86 on September 23, 2009, 02:47:10 pm
Hi everybody,
I applied this mod to cpg 1.4.25 and I encountred the same old problem of random photos and last posted photos. Noone of the solution proposed worked! The solution was modifing the theme.php like this:

version proposed in the mod:

Code: [Select]
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 100; //(-1 for all pics in album)
################################################
    global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = (empty($_GET['album'])) ? $picId['aid'] : $_GET['album'];


corrected versione:

Code: [Select]
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 100; //(-1 for all pics in album)
################################################
    global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = (empty($_GET['album']) || $_GET['album']=='random' || $_GET['album']=='lastup') ? $picId['aid'] : $_GET['album'];

bye bye
pietro

ps: I apologize for my bad English!
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: Joe Carver on September 23, 2009, 03:39:15 pm
Nice work - I was just now able to apply your mod. to the LightBox plugin.

It seems to solve the same problem there too.
Title: Re: LightBox JS for Fullsize Popup Slideshow
Post by: purplefreak3 on December 28, 2009, 07:48:33 am
Hello I was wondering if possible could give me any help with this lightbox mod, it is very nice mod but when I use Internet explorer I can not view the flash files in the gallery all I get is a blank screen but can hear audio. If I use firefox then it works fine.

I have these mods currently installed.
Another FLV Player
LightBox JS for Fullsize Popup Slideshow

Uninstall Mods
Enlargeit

I was going to disable Enlargeit (even uninstalled it) but even when that still get a blank page when viewing flash files, images all work fine. Well after working with the code and pulling different code off I found that everything works if I do not use the Lightbox, but once I add the lightbox the flash files will no longer work (even if enlargeit is uninstalled). So I am guessing there is a conflict between the "Another FLV Player" and the "LightBox JS for Fullsize Popup Slideshow" mods.

If you need this information I am not trying to use the lightbox for the video files only the images. Does anyone know about this kind of problem? if so is there a solution like changing piece of the code?

Links to gallery

Regular user one (set up without lightbox)
http://www.beautifuljodelle.com/gallery/index.php?theme=default (http://www.beautifuljodelle.com/gallery/index.php?theme=default)

One with lightbox set up
http://www.beautifuljodelle.com/gallery/index.php?theme=image_media (http://www.beautifuljodelle.com/gallery/index.php?theme=image_media)

Besides the gallery banner and color of the site and of the course the code for lightbox the coding of the two are the same.

Please and Thank You for any help.