Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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

Author Topic: LightBox JS for Fullsize Popup Image  (Read 436338 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Re: LightBox JS for Fullsize Popup Image
« Reply #80 on: January 31, 2007, 01:10:53 am »

Probably your theme's template.html
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #81 on: January 31, 2007, 08:59:27 am »

olti,
If that doesn't work, could you post what is between your <head> tags from template.html?
to see what scripts you are loading.
Logged

olti

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 68
    • Galeria Shqiptare - Albanian Gallery
Re: LightBox JS for Fullsize Popup Image
« Reply #82 on: January 31, 2007, 11:04:45 am »

olti,
If that doesn't work, could you post what is between your <head> tags from template.html?
to see what scripts you are loading.

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html dir="{LANG_DIR}">
<head>
<link rel="stylesheet" href="themes/water_drop/lightbox/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="themes/water_drop/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="themes/water_drop/lightbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="themes/water_drop/lightbox/js/lightbox.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
<!-- $Id: template.html 2688 2005-12-04 03:22:35Z donnoman $ -->
</head>
<body>
  {CUSTOM_HEADER}
  <table width="100%" border="0" cellpadding="20" cellspacing="20">
    <tr>
      <td valign="top" style="border: 1px solid #CCD7E0; background-color: #FFFFFF;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%" align="center">
              <br><script type="text/javascript"><!--
google_ad_client = "pub-0961475972968219";
google_alternate_ad_url = "http://www.galeriashqiptare.net/google_adsense_script.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
//2007-01-25: GSH, galeriashqiptare.net
google_ad_channel = "9956356473+0005703492";
google_color_border = "DD1414";
google_color_bg = "FFFFFF";
google_color_link = "DD1414";
google_color_text = "000000";
google_color_url = "C0C0C0";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br>
              {SYS_MENU}<br />{SUB_MENU}
            </td>
          </tr>
        </table>
        <img src="images/spacer.gif" width="1" height="15" alt="" />
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top">
              {ADMIN_MENU}
              {GALLERY}
              <div style="text-align:center;">
              <div>
<script type="text/javascript"><!--
google_ad_client = "pub-0961475972968219";
google_alternate_ad_url = "http://www.galeriashqiptare.net/google_adsense_script.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
//2007-01-25: GSH, galeriashqiptare.net
google_ad_channel = "9956356473+0005703492";
google_color_border = "DD1414";
google_color_bg = "FFFFFF";
google_color_link = "DD1414";
google_color_text = "000000";
google_color_url = "C0C0C0";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br><br>

<center><font face="Arial" style="font-size: 9pt"><a href="http://www.galeriashqiptare.net/cms/index.php?option=com_content&task=view&id=12&Itemid=35">
<font color="#C0C0C0">Klauzole</font></a><font color="#C0C0C0"> | </font> <a href="http://www.galeriashqiptare.net/cms/index.php?option=com_content&task=view&id=13&Itemid=36">
<font color="#C0C0C0">Kush jemi ne</font></a><font color="#C0C0C0"> | </font> <a href="http://www.galeriashqiptare.net/cms/index.php?option=com_contact&Itemid=33">
<font color="#C0C0C0">Kontakt</font></a><font color="#C0C0C0"> | </font> <a href="http://www.galeriashqiptare.net/cms/index.php?option=com_joomlaboard&Itemid=42">
<font color="#C0C0C0">Forum</font></a><font color="#C0C0C0"> | </font> <a href="http://www.galeriashqiptare.net/cms/index.php?option=com_joomlaboard&Itemid=42&func=showcat&catid=2">
<font color="#C0C0C0">Ndihme</font></a><font color="#C0C0C0"> | </font> <br> &#169; Te gjitha te drejtat e materialeve te publikuara i takojne autoreve perkates.</font>
<br><font color="#C0C0C0">
</font>
<font face="Arial" style="font-size: 7pt">
<a href="http://www.galeriashqiptare.net"><font color="#C0C0C0">Albanian Photography - Art - Culture - History - Maps - Sport - Fashion - Beauty</font></a><font color="#C0C0C0"> |
</font> <a href="http://coppermine.sourceforge.net/">
<font color="#C0C0C0">Powered by Coppermine Photo Gallery</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.zeriyt.com/index.php?option=com_smf&forumi=politik&Itemid=43"><font color="#C0C0C0">Forumi Politik</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.zeriyt.com/"><font color="#C0C0C0">Forumi Shkencor
</font> </a><font color="#C0C0C0">&nbsp;| </font> <a href="http://www.zeriyt.com/">
<font color="#C0C0C0">Forumi
Kulturor</font></a><font color="#C0C0C0"> | </font> <a href="http://www.zeriyt.com/">
<font color="#C0C0C0">Forumi Teologjik</font></a><font color="#C0C0C0"> | </font> <a href="http://www.zeriyt.com/">
<font color="#C0C0C0">Forumi Letrar</font></a><font color="#C0C0C0">
| </font> <a href="http://www.zeriyt.com/"><font color="#C0C0C0">Komuniteti Zeri YT!</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.arnavutum.com/"><font color="#C0C0C0">Arnavutum.Com</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.albaniafoto.com/"><font color="#C0C0C0">AlbaniaFoto</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.Alblinux.com/"><font color="#C0C0C0">AlbLinux</font></a><font color="#C0C0C0"> |
</font> <a href="http://www.konsumerizem101.com/"><font color="#C0C0C0">Konsumerizem101</font></a><font color="#C0C0C0"> 
| </font> <a href="http://www.kaltersiashqiptare.com/"><font color="#C0C0C0">Kaltersia Shqiptare</font></a><font color="#C0C0C0"> 
| </font><a href="http://www.radioiliria.com/"><font color="#C0C0C0">Radio Iliria</font></a><font color="#C0C0C0"> 
| </font><a href="http://faretop.com/"><font color="#C0C0C0">Njoftime Interesante</font></a><font color="#C0C0C0"> 
| </font> </font><br>

</center>
 

{LANGUAGE_SELECT_FLAGS}<br />
  {THEME_SELECT_LIST}{LANGUAGE_SELECT_LIST}
  </div>
  </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  {CUSTOM_FOOTER}{VANITY}
</body>
</html>
Logged

olti

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 68
    • Galeria Shqiptare - Albanian Gallery
Re: LightBox JS for Fullsize Popup Image
« Reply #83 on: January 31, 2007, 11:05:40 am »

Of using the first version of the  hack, from Gizmo.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #84 on: January 31, 2007, 12:52:05 pm »

I think your problem is you don't add the "lightbox_s.js" script.
It is highly possible that it won't work without that one.

Follow the steps as described in the last explanation and then it will have to work.

Grz
Logged

olti

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 68
    • Galeria Shqiptare - Albanian Gallery
Re: LightBox JS for Fullsize Popup Image
« Reply #85 on: January 31, 2007, 03:45:59 pm »

No, it don't! I tried the last version too, but without results.
Logged

iserah

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Image
« Reply #86 on: February 21, 2007, 02:20:46 am »

Goodday,

well to make a long story short im using Coppermine v1.4.10 and i bridged it using this script/mod. Now i have tryed allmost all lightbox scripts posted here on the forums, but none of them works  ???

here are the scripts after adding the scripts provided on this threath:

my theme.php
Code: [Select]
<?php
/*************************
Coppermine Photo Gallery
e107 integrated theme
************************
This theme is based on original 'Classic' theme from Coppermine.
v1.0

Coppermine version: 1.4.9
$Source$
$Author: v3 <v3@sonic-world.ru>$
$Revision: 1.02 $
$Date: 2006-09-28 04:48:42 +0400 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// get tablestyle
global $CONFIG;

if (!
defined('CPG_E107_CLASS_INCLUDED')) {
header("Location: ".$_SERVER['PHP_SELF']."?theme=classic");
die;
}

ob_start();
tablestyle("{{{CAPTION}}}""{{{TEXT}}}");
$_e107_table =
ob_get_clean();
define ("e_PAGETITLE"$CONFIG['gallery_name']);

$_e107_table_start substr ($_e107_table0strpos($_e107_table"{{{TEXT}}}"));
$_e107_table_end substr ($_e107_tablestrpos($_e107_table"{{{TEXT}}}") + 10);

// table_stack
$v3_table_stack = array();

$v3v3 1;

function 
pageheader($section$meta '')
{
global $sql$tp$HEADER;
 global $CONFIG$THEME_DIR$USER;
global $_e107_table_start$_e107_table_end;

$eplug_css "themes/" . ($USER['theme'] ? $USER['theme'] : $CONFIG['theme']) . "/style.css";
$eplug_js "scripts.js";

if (!is_object($sql)) $sql = new db;
require_once(HEADERF);

echo str_replace("{{{CAPTION}}}"$CONFIG['gallery_name'], $_e107_table_start);
/* default */

    global 
$template_header$lang_charset$lang_text_dir$lang_index_php$lang_main_menu;
    

    
$custom_header cpg_get_custom_include($CONFIG['custom_header_path']);

    
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    
user_save_profile();

    
$template_vars = array('{LANG_DIR}' => $lang_text_dir,
        
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' strip_tags(bb_decode($section)),
        
'{CHARSET}' => $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'],
        
'{META}' => $meta,
        
'{GAL_NAME}' => $CONFIG['gallery_name'],
        
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        
      
/*  '{SYS_MENU}' => tablestyle($lang_index_php['welcome'], theme_main_menu('sys_menu')),
        '{SUB_MENU}' => tablestyle($lang_main_menu['alb_list_lnk'], theme_main_menu('sub_menu')),*/
        
        
'{SYS_MENU}' => theme_main_menu('sys_menu'),
        
'{SUB_MENU}' => theme_main_menu('sub_menu'),      
        
        
'{ADMIN_MENU}' => theme_admin_mode_menu(),
        
'{CUSTOM_HEADER}' => $custom_header,
        );

    echo 
template_eval($template_header$template_vars);
}

function 
starttable($width '-1'$title ''$title_colspan '1')
{
    global 
$CONFIG$v3_table_stack$_e107_table_start;

    if (
$width == '-1'$width $CONFIG['picture_table_width'];
    if (
$width == '100%'$width $CONFIG['main_table_width'];
    
$tablestart "";
$bck debug_backtrace();
$func $bck[1]['function'];

$add "";

if (preg_match("#<h2>(.*)<\/h2>#"$title$tmp)) {
$add "<div class='forumheader'>$title</div>";
$title $tmp[1];
}

if ($title) {
$tablestart str_replace ("{{{CAPTION}}}"$title$_e107_table_start);
array_push($v3_table_stacktrue);
} else {
array_push($v3_table_stackfalse);
}

    echo <<<EOT
$tablestart
<!-- Start standard table -->
$add
<table align="center" width="
$width" cellspacing="1" cellpadding="0" class="maintable">
EOT;

}

function 
endtable()
{
global $_e107_table_end$v3_table_stack;

$tableend "";
if (array_pop($v3_table_stack))
$tableend $_e107_table_end;

    echo <<<EOT
</table>
<!-- End standard table -->
$tableend
EOT;
}

function 
pagefooter()
{
    
//global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    
global $USER$USER_DATA$ALBUM_SET$CONFIG$time_start$query_stats$queries;;
    global 
$template_footer;

    
$custom_footer cpg_get_custom_include($CONFIG['custom_footer_path']);

    if (
$CONFIG['debug_mode']==|| ($CONFIG['debug_mode']==&& GALLERY_ADMIN_MODE)) {
    
cpg_debug_output();
    }

    
$template_vars = array(
        
'{CUSTOM_FOOTER}' => $custom_footer,
        
'{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );

    echo 
template_eval($template_footer$template_vars);
/* e107 */
global $sql$tp$HEADER;
global $_e107_table_start$_e107_table_end;

echo $_e107_table_end;

require_once(FOOTERF);
    
}
$template_album_admin_menu = <<<EOT
         <div align="center" class="admin_menu_div">
                        <div align="center" valign="middle" class="admin_menu">
                                <a href="delete.php?id={ALBUM_ID}&amp;what=album"  class="adm_menu" onclick="return confirm('{CONFIRM_DELETE}');">{DELETE}</a>
                        </div>
                        <div align="center" valign="middle" class="admin_menu">
                                <a href="modifyalb.php?album={ALBUM_ID}"  class="adm_menu">{MODIFY}</a>
                        </div>
                        <div align="center" valign="middle" class="admin_menu">
                                <a href="editpics.php?album={ALBUM_ID}"  class="adm_menu">{EDIT_PICS}</a>
                        </div>
                        <br clear="all" />
        </div>

EOT;
$template_gallery_admin_menu = <<<EOT

                <div align="center" class="admin_menu_div">
<!-- BEGIN admin_approval -->
                                <div class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></div>
<!-- END admin_approval -->
                                <div class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></div>
                                <div class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></div>
                                <div class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></div>
                                <div class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></div>
                                <div class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></div>
                                <div class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></div>
                                <div class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></div>
                                <br clear="all" />
<!-- BEGIN log_ecards -->
                                <div class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></div>
<!-- END log_ecards -->
                                <div class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></div>
                                <div class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></div>
                                <div class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></div>
                                <div class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></div>
<!-- BEGIN documentation -->
                                <div class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></div>
<!-- END documentation -->
<br clear="all" />
                </div>

EOT;
// HTML template for user admin menu
if (!isset($template_user_admin_menu))  //{THEMES}
$template_user_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
                                <td class="admin_menu"><a href="albmgr.php" title="{ALBMGR_TITLE}">{ALBMGR_LNK}</a></td>
                                <td class="admin_menu"><a href="modifyalb.php" title="{MODIFYALB_TITLE}">{MODIFYALB_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                        </tr>
                </table>
                </div>

EOT;

$template_sys_menu_spacer "";

$template_sys_menu = <<<EOT
<div class="sys_menu">
          {BUTTONS}
          <br clear="all" />
</div>
EOT;

// 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']) > 4array_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']==|| $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'])) {
        $picfull_url get_pic_url($CURRENT_PIC_DATA'fullsize');
        $pic_title $CURRENT_PIC_DATA['title'];
            
$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=\"$picfull_url\" rel=\"lightbox\" title=\"$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: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);
}
?>

and my template.html
Code: [Select]
<link rel="stylesheet" href="themes/e107/lightbox/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="themes/e107/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="themes/e107/lightbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="themes/e107/lightbox/js/lightbox.js"></script>
{CUSTOM_HEADER}
<div align="center" class="top_menu_div">
{SYS_MENU}<br clear="all" />{SUB_MENU}
</div>
<br clear="all" />
<img src="images/spacer.gif" width="1" height="15" alt="" />
{ADMIN_MENU}
<br />
{GALLERY}
<div align="center">
{THEME_SELECT_LIST}
{LANGUAGE_SELECT_LIST}
</div>
{CUSTOM_FOOTER}

My dir looks like
Quote
-/e107/
-------theme.php
-------template.html
-------style.css
-------/images/
---------------button_bg.gif
---------------button_bg_anim.gif
---------------tile.gif
-------/lightbox/
----------------index.html
----------------/js/
-------------------effects.js
-------------------lightbox.js
-------------------prototype.js
-------------------scriptaculous.js
----------------/css/
---------------------lightbox.css
----------------/images/
------------------------lots of jpg but not relevant

Please if anyone can help me with this i would be very thankfull ;)

Thanks in advance,

IseraH
www.kaizen.nl.tt
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #87 on: February 21, 2007, 03:17:47 am »

When you use your E107 style, it works perfectly!

If the problem is it won't work with all your themes, then you've got to add the lightbox code to every theme.php file (one for each theme).

And because the E107 theme fits your site, you might want to disable the "choose a theme" and default it to E107.

Grz
Logged

iserah

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Image
« Reply #88 on: February 21, 2007, 04:44:27 am »

hey,

huh suddenly it works  ??? :o

im sooo SORRY for taking some of your time  :-X :-[

Greetings,

IseraH
Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #89 on: February 23, 2007, 08:18:45 pm »

I can't find atached file lightbox_s.js.zip mentioned in step 5. Can someone help me?

Thanks

Nuno Chaleta
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #91 on: February 24, 2007, 02:13:46 am »

Hi,

Now I see it. Don't know how could I not see it before  :P

Thanks
Logged

Nibbler

  • Guest
Re: LightBox JS for Fullsize Popup Image
« Reply #92 on: February 24, 2007, 02:19:18 am »

Attachments are only visible to logged in users. :)
Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #93 on: February 24, 2007, 01:37:38 pm »

It is not working for me. I've tried it whit two diferent themes and the same thing happens. When selecting a picture for display it doesn't appear. Only a small square does. I get no error messages. My gallery is version 1.4.3 and I've tried the mac and project VII themes. The site is running on a windows server (wondering if it could be it).

The gallery url is www.chaleta.com/gallery

Thanks for your help
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #94 on: February 24, 2007, 01:54:39 pm »

Are you sertain you haven't modified the code that you had to copy/paste in your theme.php file?
Some of your random images are shown the right way.

The problem on most pages is there is nor <img> tag defined to show the pic.

[edit] I think it is a problem in the $CURRENT_PIC_DATA that isn't passed correctly.

you can find it in the following part:
Code: [Select]
#################################################
                    //First part of lightbox update
                    $pic_html = lightbox_list($CURRENT_PIC_DATA);
                    //End of first part
#################################################
« Last Edit: February 24, 2007, 02:06:47 pm by SaWey »
Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #95 on: February 24, 2007, 03:27:10 pm »

Hi,

First off all thanks for your help.

I've pasted the code provided in the last summary off the post in the theme.php file of my current theme. In fact i've tried it in two diferent themes to see if it could be a theme related problem.

Hi have photo of the day by casper hack installed, dont know if it could be a problem for the javascript.

Here is the code i've pasted at the end of my theme.php file just before the ?> tag.
Thanks again.

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['pid']);

        //End of first part

#################################################

        } 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: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;

}



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;

}

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) {

$picList .= "<a href=\"$picture_url_fullsize\" 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\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";

}

}

}

$i++;

}

return $picList;

}//End of second part

#################################################

?>
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #96 on: February 24, 2007, 04:31:41 pm »

in the following part you have something wrong,
Code: [Select]
#################################################
                 //First part of lightbox update
                 $pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);
                 //End of first part
#################################################

Has to be:
Code: [Select]
#################################################
                 //First part of lightbox update
                 $pic_html = lightbox_list($CURRENT_PIC_DATA);
                 //End of first part
#################################################
Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #97 on: February 25, 2007, 05:05:55 am »

Hi,

I've changed it as you said.

Now it shows the picture put the full image desnt show lightbox.

Slideshow is not lightbox as well?

Thanks

chaleta

Logged

chaleta

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: LightBox JS for Fullsize Popup Image
« Reply #98 on: February 25, 2007, 05:21:35 am »

Hi,

I've changed it as you said.

Now it shows the picture put the full image desnt show lightbox.

Slideshow is not lightbox as well?

Thanks

chaleta



Spoken to soon.

It is working fine, thanks  ;)

Still there is a problem.

My gallery integreted in joomla doesn't work the same way?

Is there a way to meke it work?

Thanks

Chaleta
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #99 on: February 25, 2007, 02:47:54 pm »

I've looked at the source of your Yoomla integrated gallery and may have found the problem.

You might try to add the following in your second body tag:

Code: [Select]
<body onload="initLightbox()">

Make sure it is in the body tag of the Coppermine template, and not in your Yoomla template.
It could be a problem of interfering javascripts.
Logged
Pages: 1 2 3 4 [5] 6 7 8 9 ... 17   Go Up
 

Page created in 0.036 seconds with 20 queries.