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

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

Main Menu

LightBox JS for Fullsize Popup Image

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SaWey

Hey Keen

Can you post a link to your gallery? so I can see what the problem is.

Grz

SaWey

Are you certain you followed the instructions of this message: http://forum.coppermine-gallery.net/index.php?topic=35539.msg192915#msg192915

There is a problem with finding the image that has to be displayed.

Please post your complete theme.php file.

Something 's going wrong in the lightbox_list function :

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


Commander Keen

#142
I'm pretty shure I did. After all it was only copy and paste...

But here's my theme.php:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.10
  $Source$
  $Revision: 3275 $
  $Author: gaugau $
  $Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                           //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;


// Displays a picture /start of lightscript
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'])) {
#################################################
        //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, -1false);
$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 + ($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
#################################################
?>


SaWey

Try changing this at line 140:

$pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);

to
$pic_html = lightbox_list($CURRENT_PIC_DATA);

Commander Keen

It worked! Thanks very much!

Greetings, Commander Keen

Commander Keen

Quote from: Nibbler on January 27, 2007, 11:38:55 PM

This mod will not work well on large albums, bear that in mind.


Can you tell me why? Because I would like to increase the number of Pics schown in a slideshow

SaWey

Hey Keen,

Big albums are not a problem anymore,
The problem was it would take a lot of time loading all images if you have very large albums.
Now you can set a maximum amount of images to load.
Default it is 10, look at the first line of the lightbox_list function in your theme.php yo change this.

Commander Keen

Yes, i understand.
Do you mean this:
################################################
//Set max number of images
$max = -1; //(-1 for all pics in album)
################################################

I think the question is, what is a big album? I had already set the value to -1 and had no problems watching slideshows with 80 pictures.
I don't think, lightbox is loading all images in the folder at once

SaWey

I think you will have to see that yourself,
Every server has his limits. When the loading slows down, you probably should set a limit.

I've got an album with 1200 pics loading without any delay.

See for yourself and if it going bad, you know you can set a limit.
Grz

liberte

Gizmo
This is very nice, thank you for this contribution.

i have seen such galleries at some joomla gallery components
and was trying to do it for coppermine whole this day,
but you have written the solution few months ago
You are great

CucAgMuH

 Hi,

I'm completely new to cpg and all this stuff(img`s never been my passion :) ) I've installed cpg before a week, after two or three days I'finished modifyng some themes. Now I have just a little problem - Light/Grey Box. I was trying again, and again to make this thing work, but the result wasn't from the good ones :) Can somebody look at my gallery and try to tell me where I messed up the things, and(if he can, wants and has free time) to tell me how to fix this ... the gallery I'm experimenting with is at: http://gallery.badmin.org

SaWey

Hey CucAgMuH

The problem is you haven't linked your scripts and css right.
use these links instead:

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


CucAgMuH

Yeah, got it... :)

It's just messed up all... as usual. :) Sorry for the time I wasted you with this stupid problem, but I have to make this work, before going to bed... it just drove me crazy. Tommorow I'll finish the rest of the problems(some stupid back buttons conflict[it appears that they use the same path+name], some traffic reduce and so on... and so on...). The problem is that I just can't keep my eyes open any more... everything smells like bed :) Thanks for the fast help, I really appreciate the you've done for me :)

Alcor

I've tried to install the Lightbox with Highslide plugin. I followed all the steps but Lightbox didn't work so I decided to apply the Ajax Lightbox:. Now it seems work but the load of the large image is slowest in FF, and in the IE the browser shows me a popup warning about a script. I think that the wrong thing is in my theme.php, the functions theme_joomla_menu() and user_joomla_menu() . Here I paste the code, if somebody can help me...

<?php

function theme_joomla_menu(){
$joomla_menu '
<link href="themes/cda07/mod_d4j_transmenu/mod_d4j_transmenu.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */
/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */
.transMenu .background {
position:absolute;
left:0px; top:0px;
z-index:1;
-moz-opacity:0.5;
filter:alpha(opacity=50);
}
/* same concept as .background, but this is the sliver of shadow on the right of the menu. It\'s left, height, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowRight {
position:absolute;
z-index:3;
top:3px; width:2px;
-moz-opacity:0.4;
filter:alpha(opacity=40);
}
/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It\'s top, width, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowBottom {
position:absolute;
z-index:1;
left:3px; height:2px;
-moz-opacity:0.4;
filter:alpha(opacity=40);
}
</style>
<table cellpadding="0" cellspacing="0" class="moduletable">
<tr>
<td>

<div id="transmenu45438" style="display:none"></div>
<script language="JavaScript" type="text/JavaScript">function getBgColor(root) {
var bgColor = \'\';
if (typeof root.style != \'\') {
if (typeof root.style.backgroundColor != \'undefined\' && root.style.backgroundColor != \'\') {
bgColor = root.style.backgroundColor;
}
} else if (typeof root.bgColor != \'undefined\' && root.bgColor != \'\') {
bgColor = root.bgColor;
} else {
bgColor = getBgColor(root.parentNode);
}
return bgColor;
}</script>
<script language="javascript" type="text/javascript" src="themes/cda07/mod_d4j_transmenu/transmenu.compact.js"></script>
<script language="JavaScript" type="text/JavaScript">var menu_class_suffix = "-menu";

// Placeholder CSS class
var sub_placeholder_style = "mainlevel";

// TransMenu settings
TransMenu.spacerGif = "themes/cda07/mod_d4j_transmenu/img/x.gif";                     // path to a transparent spacer gif
TransMenu.dingbatOn = "themes/cda07/mod_d4j_transmenu/img/submenu-on.gif";            // path to the active sub menu dingbat
TransMenu.dingbatOff = "themes/cda07/mod_d4j_transmenu/img/submenu-off.gif";          // path to the inactive sub menu dingbat
TransMenu.shadowPng = "themes/cda07/mod_d4j_transmenu/img/grey-40.png";               // a PNG graphic to serve as the shadow for mac IE5
TransMenu.backgroundPng = "themes/cda07/mod_d4j_transmenu/img/white-90.png";          // a PNG graphic to server as the background for mac IE5
TransMenu.dingbatSize = 16;
TransMenu.menuPadding = 0;
TransMenu.itemPadding = 0;
TransMenu.shadowSize = 2;
TransMenu.shadowOffset = 3;
TransMenu.shadowColor = "#888";

TransMenu.backgroundColor = "#fff";

TransMenu.hideDelay = 1000;
TransMenu.slideTime = 400;

// if supported, initialize TransMenu
function initTransMenu() {
if (TransMenu.isSupported()) {
TransMenu.initialize();
}
}</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle"><a id="transmenu68022_menu1" class="mainlevel-menu" href="/component/option,com_frontpage/Itemid,1/">Inicio</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu2" class="mainlevel-menu" href="/content/section/1/2/">Noticias</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu71" class="mainlevel-menu" href="/component/option,com_smf/">Foros</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu72" class="mainlevel-menu" href="/content/section/4/72/">Art&iacute;culos</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu68" class="mainlevel-menu" href="/cpg/">Fotos</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu110" class="mainlevel-menu" href="/component/option,com_blastchatc/Itemid,110/">Chat</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu69" class="mainlevel-menu" href="/component/option,com_bookmarks/Itemid,69/">Enlaces</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu80" class="mainlevel-menu" href="/index.php">Aplicaciones</a>
</td>
<td valign="middle"> <img border="0" src="themes/cda07/mod_d4j_transmenu/img/x.gif" align="absmiddle" />
</td>
<td valign="middle"><a id="transmenu68022_menu82" class="mainlevel-menu" href="/component/option,com_sobi/Itemid,82/">List&iacute;n</a>
</td>
</tr>
</table>
<script language="JavaScript" type="text/JavaScript">if (TransMenu.isSupported()) {
self[\'transmenu68022\'] = new TransMenuSet(TransMenu.direction.down, 0, 0, TransMenu.reference.bottomLeft);

document.getElementById(\'transmenu68022_menu1\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
document.getElementById(\'transmenu68022_menu2\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
document.getElementById(\'transmenu68022_menu71\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
document.getElementById(\'transmenu68022_menu72\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
document.getElementById(\'transmenu68022_menu68\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
document.getElementById(\'transmenu68022_menu110\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
var transmenu68022_menu69 = self[\'transmenu68022\'].addMenu(document.getElementById("transmenu68022_menu69"));
transmenu68022_menu69.addItem("Cont&aacute;ctanos", "/component/option,com_contact/Itemid,3/", 0);

var transmenu68022_menu80 = self[\'transmenu68022\'].addMenu(document.getElementById("transmenu68022_menu80"));
transmenu68022_menu80.addItem("Calculadora", "/component/option,com_calgye/Itemid,74/", 0);
transmenu68022_menu80.addItem("Ficha cr&iacute;a", "/component/option,com_facileforms/Itemid,79/", 0);
transmenu68022_menu80.addItem("Nombres de agapornis", "/component/option,com_scrollnames/Itemid,112/", 0);

document.getElementById(\'transmenu68022_menu82\').onmouseover = function() { self[\'transmenu68022\'].hideCurrent(); }
TransMenu.renderAll();
}
if (window.addEventListener) {
window.addEventListener(\'load\', initTransMenu, false);
} else if (window.attachEvent) {
var tmev = window.attachEvent(\'onload\', initTransMenu);
} else {
initTransMenu();
}</script>
</td>
</tr>
</table>'
;
return 
$joomla_menu;
}
function 
user_joomla_menu(){
if (
USER_ID){
$user_menu '
<link rel="stylesheet" type="text/css" href="../modules/dm-t_2-0-1/css/dm-t.css" />
<script type = "text/javaScript" src="../modules/dm-t_2-0-1/js/menu.js"></script>
<script type = "text/javascript">
var link = document.createElement( \'link\' );
link.setAttribute( \'href\', \'/modules/dm-t_2-0-1/css/dm-t.css\' );
link.setAttribute( \'rel\', \'stylesheet\' );
link.setAttribute( \'type\', \'text/css\' );
var head = document.getElementsByTagName(\'head\').item(0);
head.appendChild(link);
</script>

<script type = "text/javascript">
var MENU_ITEMS263322 =
[

 wrap([\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;Men&uacute; usuario\', \'http://www.domain.com/#\', {\'tw\' : \'_self\', \'sb\' : \'Men&uacute; usuario\'},
 [\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;Comunidad\', \'http://www.domain.com/ index.php?option=com_places&Itemid=59\', {\'tw\' : \'_self\', \'sb\' : \'Comunidad\'},
 [\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;A&ntilde;adir nuevo\', \'http://domain.com/index.php?option=com_places&task=new\', {\'tw\' : \'_self\', \'sb\' : \'AƱadir nuevo\'}],],
 [\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;Enviar enlace\', \'http://domain.com/index.php?option=com_bookmarks&task=new&Itemid=60&mode=0&catid=-1&navstart=0&search=*\', {\'tw\' : \'_self\', \'sb\' : \'Enviar enlace\'}],
 [\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;Enviar noticia\', \'http://www.domain.com/index.php?option=com_content&task=new&sectionid=1&Itemid=0\', {\'tw\' : \'_self\', \'sb\' : \'Enviar noticia\'}],
 [\'<img src="http://www.domain.com/images/M_images/arrow.png" border="0">&nbsp;Mi informaci&oacute;n\', \'http://www.domain.com/component/option,com_user/task,UserDetails/\', {\'tw\' : \'_self\', \'sb\' : \'Mi informaciĆ³n\'}],]),

];

function wrap( item ) {
var url_current = String(window.location);
var url_link = \'\' + \'/\' + item[1];

if ( url_current == url_link )
item[0] = \'<span id="dm_t-active_link">\' + item[0] + \'</span>\';
return (item);
}
</script> 


<script type = "text/javascript">
var MENU_POS263322 =
[

{
\'width\': 110,
\'height\': 20,

\'top\': 0,
\'left\': 110,

\'block_top\': 0,
\'block_left\': 0,

\'hide_delay\': 200,
\'expd_delay\': 200,

\'css\' : {
\'outer\': \'\',
\'inner\': [\'dm_t-0\', \'dm_t-0_over\', \'dm_t-0_down\']
}
},
{

\'width\': 110,
\'height\': 20,

\'top\': 21,
\'left\': 0,

\'block_top\': 21,
\'block_left\': 30,

\'hide_delay\': 200,
\'expd_delay\': 200,

\'css\': {
\'outer\': \'\',
\'inner\': [\'dm_t-1\', \'dm_t-1_over\', \'dm_t-1_down\']
}
},
{

\'width\': 110,
\'height\': 20,

\'top\': 21,
\'left\': 0,

\'block_top\': 5,
\'block_left\': 90,

\'hide_delay\': 200,
\'expd_delay\': 200,

\'css\': {
\'outer\': \'\',
\'inner\': [\'dm_t-2\', \'dm_t-2_over\', \'dm_t-2_down\']
}
},
{

\'width\': 110,
\'height\': 20,

\'top\': 21,
\'left\': 0,

\'block_top\': 5,
\'block_left\': 90,

\'hide_delay\': 200,
\'expd_delay\': 200,

\'css\': {
\'outer\': \'\',
\'inner\': [\'dm_t-3\', \'dm_t-3_over\', \'dm_t-3_down\']
}
}


];
</script> 
<div style="position: relative; z-index: 1000;"> 
<script type = "text/javascript">
new menu( MENU_ITEMS263322, MENU_POS263322 );
</script>
</div>
<div class="dm_t-whole" style="height: 0px; width: 0px;"></div>'
;
return $user_menu;
}
}
?>


Thanks.

Alcor

And the template.html

<!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>
<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/cda07/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../templates/cda07/css/template_css.css" />
<script type="text/javascript" src="scripts.js"></script>
<!-- $Id: template.html,v 1.6 2005/12/04 03:22:35 donnoman Exp $ -->
</head>
<body>
  {CUSTOM_HEADER}

<div id="pagewidth-800" >
<div id="top">
<!--header-->
<div id="logo"><div id="pathway"><span class="pathway"><a href="http://www.domain.com/" class="pathway">Inicio</a> <img src="http://www.domain.com/images/M_images/arrow.png" alt="arrow" />   Galer&iacute;a de fotos </span></div><a href="index.php"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="790" height="165" id="logocda" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="../templates/cda07/images/cda07.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="../templates/cda07/images/cda07.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="790" height="165" name="logocda" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></a></div>
<div class="joomla_menu"><div style="padding-left:5px;">{JOOMLA_MENU}</div></div>
<div id="top-top"><div style="padding-left:10px;padding-top:1px ">{USER_JOOMLA_MENU}</div></div>
<div class="clr"></div>
</div>
<!--fin header-->
<div id="outer">
<div id="adsense"><center><script type="text/javascript"><!--
google_ad_client = "pub-0252299653xxxxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="9780023781";
google_color_border = "6688AA";
google_color_link = "FF6600";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "6699CC";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center></div>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top"><div align="center">
              <p>&nbsp;</p>
              <p>{SYS_MENU} <br />
      {SUB_MENU}
              </p>
            </div></td>
          </tr>
          <tr>
            <td align="center" valign="top">
              <div align="center">{LANGUAGE_SELECT_FLAGS}{THEME_SELECT_LIST}
              {LANGUAGE_SELECT_LIST}
            </div></td>
          </tr>
        </table>
        <img src="images/spacer.gif" width="1" height="15" alt="" />
        <br />
        <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top">
              <div align="left">{ADMIN_MENU}
              {GALLERY}
            </div></td>
          </tr>
        </table>{CUSTOM_FOOTER}<div id="vanity">{VANITY}</div>
<div class="clr"></div>
</div>
<div id="bottom">
<div id="footer-800"><div align="center">&copy; 2006 Cosas de Agapornis</div></div>
</div>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-700497-1";
urchinTracker();
</script>
</body>
</html>

SaWey

I think you should ask the one who wrote the ajax plugin, in the thread you linked to.

Alcor

Quote from: SaWey on April 17, 2007, 12:43:12 PM
I think you should ask the one who wrote the ajax plugin, in the thread you linked to.

Yes, I will do it. But I think that the issue is in the theme.php or in the template.html. Lightbox JS and  Ajax lightbox are very similar, isn't it? I proved to add the lightbox scripts inside the head tags of template.html, but Highslide didn't work for me, by this reason I decide use the Ajax.

SaWey

If you give a link to your gallery, I might see what the problem is, now I'm looking in the dark.

Kenshino

Is there anyway to define the popup size area for the Lightbox?

I have a CMS that uses a module to shrink the gallery so it loads inside Postnuke.

When I try to use lightbox, it doesn't appear over the whole website, instead it loads only over the small area where the gallery is occupying. Is there anyway I can change this?

SaWey

Hey,

That is because Postnuke load CPG in an iframe.
I found a script that might work better for you: http://www.dolem.com/lytebox/
This script can (according to the site) handle iframes.