Advanced search  

News:

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

Pages: 1 2 3 [4] 5 6 7 8 ... 10   Go Down

Author Topic: LightBox JS for Fullsize Popup Slideshow  (Read 262163 times)

0 Members and 1 Guest are viewing this topic.

HighlanderICT

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #60 on: March 05, 2008, 07:51:49 pm »

PM sent.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #61 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
Logged

HighlanderICT

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #62 on: March 05, 2008, 08:20:44 pm »

yeah, its built into Joomla. thanks for the link, will investigate.
Logged

ganeshcp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #63 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.
Logged

ganeshcp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #64 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);
}
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #65 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?
Logged

osckar

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #66 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
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #67 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)
################################################
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #68 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
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #69 on: April 10, 2008, 09:47:47 pm »

You'll have to use some kind of custom ajax function.
Logged

osckar

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #70 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!
Logged

Shemo

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #71 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.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #72 on: April 17, 2008, 12:31:27 pm »

1.4.18 works like every other version. What is the problem?
Logged

Elguerrero

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 3
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #73 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
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #74 on: April 18, 2008, 11:49:36 pm »

Try the search button, I know it's somewhere on these forums.
Logged

dereckmartin

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #75 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).
Logged

masksmaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #76 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.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #77 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.
Logged

masksmaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #78 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!
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Slideshow
« Reply #79 on: May 06, 2008, 10:00:42 pm »

I'll look and see what I can do
Logged
Pages: 1 2 3 [4] 5 6 7 8 ... 10   Go Up
 

Page created in 0.027 seconds with 20 queries.