forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Visuals => Topic started by: SaWey on January 08, 2008, 01:01:26 am
-
This mod is a fork of LightBox JS for Fullsize Popup Image (http://forum.coppermine-gallery.net/index.php?topic=35539.0),
as I've used a lot of space in that thread and people don't seem to find the right way to implement this mod,
I created this new thread with a new version.
This version uses the following scripts:
prototype 1.4
SWFObject v1.5 (fixes error in FF)
Lightbox v2.03.3 (fixes flash movies showing above slideshow)
-> lightbox_s is updated to this version and has all earlier features available:
What does it do?
It adds a nice new feature :)
This mod will override the default popup of showing the fullsize picture and it will show a nice Lightbox popup.
It is also a slideshow, you can navigate through the images in the selected album with the arrow keys or with your mouse.
Is there any configuration?
This mod is fine by default, but if you want, you can change some things in lightbox_s.js to suit your needs.
Look for the "Configuration" part in that file, there you can change the following thing:
- Animated transitions (animate)
- Transition speed (resizeSpeed)
- Border size (borderSize)
- Loop the slideshow (foreverLoop)
- Go to last image's page on exit (go_to_last_image_on_exit)
If you want to add music when playing the slideshow, see this post (http://forum.coppermine-gallery.net/index.php?topic=49596.msg238886#msg238886)
There are some more options, but these are the most important.
The slideshow, by default, only takes the next 10 images in the album, this to prevent overloading big albums.
If you want to change that, you will have to do this in your theme.php function 'lightbox_list()'.
The first line of that function has a variable to set the maximum images for a slideshow.
How do I install it?
- enclosing all contributions of other people -
(Note: attachment and install-guide based on new lightbox/slideshow script contributed in the link on http://www.huddletogether.com/forum/comments.php?DiscussionID=307&page=1#Item_0 (http://www.huddletogether.com/forum/comments.php?DiscussionID=307&page=1#Item_0))
Step 1. Backup your theme folder!
Step 2. If you haven't done already, create a folder called scripts in your gallery root directory.
Step 3. Download slideshow.zip attached (http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=49596.0;attach=16167) to this post
Step 4. Extract the whole slideshow folder into your (newly created) scripts folder.
Step 5. Add this code to the head section of your template.html file:
<link rel="stylesheet" href="scripts/slideshow/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>
<script type="text/javascript" src="scripts/slideshow/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/slideshow/js/lightbox_s.js"></script>
Step 6. Paste this code before the ?> at the end of your theme.php file:
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
#################################################
//First part of lightbox update
$pic_html = lightbox_list($CURRENT_PIC_DATA);
//End of first part
#################################################
} else {
$pic_html = lightbox_list($CURRENT_PIC_DATA);
// $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
}
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
#################################################
//Second part of lightbox update
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################
global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = empty($_GET['album']) ? $picId['aid'] : $_GET['album'];
$pic_data = get_pic_data($aid, $pic_count, $album_name, -1, -1, false);
$imax = 0; //counter
$max = $max/2;
foreach ($pic_data as $picture){
if ($picture['pid'] == $pid) {
//the number of the picture in order
$picnumber = $imax;
}
$imax++;
}
//Check beginning and ending of album
if(! ($max == ((-1)/2))){
if ($imax > $max){
if ($picnumber < $max || $picnumber == 0){
$down = 0;
$up = 0 + ($max*2);
}elseif (($picnumber + $max) > $imax){
$down = $imax - ($max*2);
$up = $imax;
}else{
$down = $picnumber - $max;
$up = $picnumber + $max;
}
}else{
$down = 0;
$up = $imax;
}
}else{
$down = 0;
$up = $imax;
}
$pic_already_shown = false; //fix to remove duplicate entries
foreach ($pic_data as $picture) {
if ($i >= $down && $i <= $up){
if($CONFIG['thumb_use']=='ht' && $picture['pheight'] > $CONFIG['picture_width'] ){
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $picture['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
$picture_page = "./displayimage.php?album=".$picture['aid']."&pos=-".$picture['pid'];
if (is_image($picture['filename'])) {
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($picture, 'normal');
} else {
$picture_url = get_pic_url($picture, 'fullsize');
}
$picture_url_fullsize = get_pic_url($picture, 'fullsize');
$pic_title = ($picture['title'] ? $picture['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($picture['filename'])), "_", " "));
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries
}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
}
}
$i++;
}
return $picList;
}//End of second part
#################################################
Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.
I don't know if this is a bug or not, doesn't cause problems on its own.
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() LIMIT $limit2";
change to
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";
Step 8. Upload
Step 9. Relax 8)
Some premature error handling:
If this thing won't work, please look at these possible solutions first:
1. -Be absolutly certain the paths to the scripts are right!
maybe you put in the code:
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>
When actualy you putted the file in:
<script type="text/javascript" src="scripts/js/prototype.js"></script>
2. -The navigation images aren't showing up?
in 'css/lightbox.css' be sure the following lines are correct:
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
and in 'js/lightbox_s.js':
var path_to_images = "scripts/slideshow/images/"; //path to your images
Changelog:
11/13/2008:
- Added internationalization.
- Added download link option + download image option.
01/19/2008:
- Fixed to not show duplicate images on 'Last Comments' album.
- Fixed proper working of fixed image size.
Final point: This mod goes unsupported!
This mod should work as is, so please follow the instructions as good as possible.
If something goes wrong, read the instructions again.
When you ask for support in this thread, don't expect a fast answer by me, I'm very busy atm.
Enjoy the mod, and if you have something to contribute, please do so.
-
Demo link please - would like to see it in all its brilliance, as well as see what happens to image ratings and comments.
Thanks
-
I don't have a demo online, will have to wait a bit.
It doesn't include ratings nor comments, those stay on the regular pages.
-
Demo link please - would like to see it in all its brilliance, as well as see what happens to image ratings and comments.
Thanks
See this Blog-post: http://www.tihass.de/74-coppermine-fullsize-slideshow.html
For those who don't understand German: click on the link "Galerie" below the last step.
-
thanks - that does look really nice!
any chance of having someone routed to the image showing in the slideshow when ever it is clicked? that way the viewer can post a comment, rating or view picture details if interested.
-
it actualy does what you request, when you exit the slideshow, you are redirected to the page of the last picture seen.
-
great - i haven't been able to get there becuase my images are too big for the screen and roll off - so the closing "x" can't be seen. Tried to adapt the js so that it limits the size of the popup - but couldn't.
The previous version is attached if anyone would like to take a crack.
-
Great Mod guys...thanks! Works awesome except I noticed one hitch after installing it.
The Resize Thumbnail/Images Utility in the Admin Tools doesn't work. Because my images where so large (off the screen) I had to delete and reload instead of resizing with the utility. Any ideas?
Thanks again!!
-
Extra info for point 7.
Step 7. Making sure the random images are shown:
these changes are in file include/functions.inc.php.
I tried to looking for that string in file mentioned in 6.
-
Thanks for noticing, changed it in my post.
-
I was looking to install a simmilar addon called ThickBox http://jquery.com/demo/thickbox/
Since this one worked very good ...
Many Thank's
Adrian Toma
www.tomasphotos.com
-
what was changed...?
Thanks for noticing, changed it in my post.
-
look in the post above that post...
-
If someone knows how to add music with this script please let me know
Im trying to add this
http://tomasphotos.com/scripts/music/song.mp3
-
That's easy, but it has a bug in firefox -> when new pic shows, the music restarts.
Anyway, here's the change:
Replace this:
if ($picture['pid'] == $pid) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
With this:
if ($picture['pid'] == $pid) {
$picList .= "<a href=\"$picture_url_fullsize\" music=\"http://tomasphotos.com/scripts/music/song.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
}else{
$picList .= "<a href=\"$picture_url_fullsize\" music=\"http://tomasphotos.com/scripts/music/song.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
-
I'm have installed Lightbox v2.03.3 and love it. However I am using lightbox.js v2.02 with the Mod so that the size of the popup images is a fixed size (uplaoded files are typically larger than the screen).
Does using lightbox.js v2.02 with Lightbox v2.03.3 stop any functions?
If so, will there be a lightbox.js v2.03.3 coming out that limits the size of the popup window?
-
That's easy, but it has a bug in firefox -> when new pic shows, the music restarts.
Anyway, here's the change:
...
Still not working (music not playing and slideshow play button disabled)
but ive decided to play the music from and external plugin source
-
I'm have installed Lightbox v2.03.3 and love it. However I am using lightbox.js v2.02 with the Mod so that the size of the popup images is a fixed size (uplaoded files are typically larger than the screen).
Does using lightbox.js v2.02 with Lightbox v2.03.3 stop any functions?
If so, will there be a lightbox.js v2.03.3 coming out that limits the size of the popup window?
The 2.03.3 fixes some minor bugs, so you won't miss any important features. though this version has some premodified things that were developed in the old thread (like redirect on exit...)
I will do the fixed size in the future, need to find some time first.
-
Could you please make an lite version, withouth the slideshow, so it will only dislay that image, not the entire album on a slideshow.thanks :D
-
You better use the other one then: LightBox JS for Fullsize Popup Image (http://forum.coppermine-gallery.net/index.php?topic=35539.0)
-
But that topic is like 100 yrs ago, and I can't find some clear instrctions for the current version of lightbox.Anyway, thanks.
-
If I have time, after some improvements, I'll look into it.
-
I am sure there is somewhere to add some lines to make the pictures open in same sizes if a picture is about 2080xblabla anything so that it opens up all pictures in same size like 1024x768 or anything ?
-
Better will be if the image size is more than the screen size, the image to be 100% width :D
-
I tested it with a plain cgp installed, and it works fine, but with joomla bridge there is some problem.
I think it is because of the theme of joomla, is that possible? And how to repair it ?
When clicking on images only a white box is shown with picture dimensions.
-
Hallo all,
i have a little problem, all looks absolute fantastic but if there are more than one comments to a picture the preview pictures appears as many comments there are...
example:
1 comment -> 1 preview pic
2 comments -> 2 preview pics
and so on...
this will only happen if you come from the "newest comments"-section, if you are navigating to the image manually (by using the categories and so on) the thumb only appears once...
Its very strange ???
I hope someone can help...
Thanks in advance
Smylo
-
I am sure there is somewhere to add some lines to make the pictures open in same sizes if a picture is about 2080xblabla anything so that it opens up all pictures in same size like 1024x768 or anything ?
Fixed this in the new version, see first post.
To configure the fixed size, you will need to modify lightbox_s.js and change:
//--- Slideshow options
var slideShowWidth = -1; // -1 size slideshow window based on each image
var slideShowHeight = -1; // -1 size slideshow window based on each image
I tested it with a plain cgp installed, and it works fine, but with joomla bridge there is some problem.
I think it is because of the theme of joomla, is that possible? And how to repair it ?
When clicking on images only a white box is shown with picture dimensions.
Can you give a link to your gallery please, I cannot see what's wrong if I can't see your gallery
Hallo all,
i have a little problem, all looks absolute fantastic but if there are more than one comments to a picture the preview pictures appears as many comments there are...
example:
1 comment -> 1 preview pic
2 comments -> 2 preview pics
and so on...
this will only happen if you come from the "newest comments"-section, if you are navigating to the image manually (by using the categories and so on) the thumb only appears once...
Its very strange ???
I hope someone can help...
Thanks in advance
Smylo
Fixed in new version, see first post.
-
The gallery is here
http://vip07.uni.cc/g/
There is one more bad effect: It seams that the picture appears under some other pictures from the site
-
I even can't see the picture in lightbox?
Can you please explain your problem a little better.
-
everything is applied as you say
Yes , no picture is seen,
If I set this mod to clear gallery, it works fine, but in here, WHITE screen
-
I don't know exectly what is wrong,
but looking at you gallery, there are some possibilities:
You have added the link to the required scripts twice, probably once in your Joomla theme, and once in cpg theme or so?
You are also using mootools, could be a conflict between those two -> try looking here (http://www.huddletogether.com/forum/search.php?PostBackAction=Search&Keywords=mootools&Type=Comments&btnSubmit=Search)
-
i would like to show the images in their own original size... but dont know what to change??
-
what i actually wanted to say, is that i have some vertical pictures and it will show them smaller than it own orginal size... why is that ?
var slideShowHeight = -1; // -1 size slideshow window based on each image
isnt that the correct value?
-
You are right, but the latest lightbox is set to always resize the image if it doesn't fit in the browser.
The picture will show a little smaller then the browser size.
You can disable this by setting the option:
var resize = 1;// Set 0 to disable auto-resizing
in lightbox_s.js
-
Please can you give me some advise how to make the mod working with site with mootools
I read that I have to change the Lightbox with Slimbox. Some info how to do what?
-
No idea,
Try this (http://forum.coppermine-gallery.net/index.php?topic=35539.msg218909#msg218909) or try searching the forum for some other mod.
-
and the two new files slimboc.css and slimbox.js
from where to get them
-
Strange things goes around
Now I just added http://vip07.uni.cc/g/ before the URLs of .js and .css
and when clicking on the picture, in same window opens just the picture, no effects
PS. Where is the edit post button?
-
You get that because the script isn't initialized, try adding
onLoad="initLightbox();"
to the body tag of your template.
You will not find the edit button, as it is disabled for regular users.
-
with onLoad="initLightbox();"
dosen't work too
say how to change the Lightbox with slimbox
to try that way
-
As I told you, you'll have to figure that out for yourself, as I haven't used slimbox before.
I don't have the time to look into that.
-
OK, now it works fine, with slimbox,
looks just the same way
But is there any way this to work with 'External Images Links / Use "remote" storage servers'
I tried but nothing figured out.
-
My CPG is integrated with Joomla and when I try to install this mod I get a blank page. I think is something wrong with theme.php because when i replace this file with the original one the problem is gone and the mod doesn't work. Pls if you can take a look at me theme.php
Thanks.
-
You have theme_html_picture() in there twice.
-
Thanks Nibler.
Removed that code but the problem still remains.
-
When I remove that code the file is fine. Maybe you have plugins interfering. Try disabling them temporarily.
-
There have been problems with Joomla integrations before,
Like Nibbler said, double check if no other mod/plugin is interfering with this one.
Most problems like this occur when using some javascript framework like mootools,
if this is the case, the solution might already be in this thread.
-
I don't know why, but I can't download your script. I get the error message "An Error Has Occurred!
You are not allowed to access this section" :(
-
The file linked to the wrong attachment, fixed it, please try again.
-
Thanks, now everything works! :)
I've just installed your script and have to say that it is great! I've just found a minor "bug", but maybe it is a bug of Lightbox itself. If I view my pictures with Firefox, they do not get displayed in Fullsize, but slightly resized which makes them look a little bit "grainy". With Opera they are displayed correctly (I'm using Linux and can't test it with IE at the moment). You can view my gallery here: http://reitterer.net/gallery/
BTW: I've bridged Joomla and Coppermine too using the bridge http://www.mehdiplugins.com/misc/index.htm and everything seems to work fine with the Coppermine Lightbox script so far. :)
-
It's a lightbox thing, look at this post (http://forum.coppermine-gallery.net/index.php?topic=49596.msg240140#msg240140) how to disable the auto resizing.
-
Thanks! I should have read the thread more carefully. :)
-
I have an error
Fatal error: Cannot redeclare theme_html_picture() (previously declared in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php:37) in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php on line 396
-
The theme you are using already has some of the content you had to paste in your theme.php, you'll have to change it manually.
Look at the differences of the function theme_html_picture() in 'include/theme.inc.php' and the one you have pasted in your theme.php.
The remove the theme_html_picture() function you pasted in your theme.php, look for that existing function and only add the differences you noticed.
-
Then:
Parse error: syntax error, unexpected '}' in D:\server\Abyss Web Server\htdocs\host_pictures\themes\fruity\theme.php on line 206
Line 206
return template_eval($template_display_media, $params); 204
} 205
} else { 206
$pic_html = lightbox_list($CURRENT_PIC_DATA);
-
Can you post your theme.php, that'll be easier
-
OK
Thank You
-
I changed your theme.php, download and replace your theme.php
-
installed this as per instructions and it seems to be correct but when clicking on an image i go from an error free page to one where firebug just scrolls infinitely with the attached error ... please help.
Setup
Joomla 1.5.1
CPG 1.4.16
Mehdi's Bridge
Installed Plugins
Final_Extract v2.2
File to Album mover v0.1
Name CPGMassImport v2.0
Attachments
error.gif - copyof firebug screen
theme.php - basically a copy of the one from waterdrop theme but with edits for this mod.
-
A link to your site would be easier
-
PM sent.
-
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
-
yeah, its built into Joomla. thanks for the link, will investigate.
-
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.
-
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:
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&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);
}
-
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?
-
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
-
You can easily do that by changing the number as indicated:
#################################################
//Second part of lightbox update
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################
-
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
-
You'll have to use some kind of custom ajax function.
-
You can easily do that by changing the number as indicated:
#################################################
//Second part of lightbox update
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
################################################
Thank you!
-
Is this working for 1.4.18 because I cannot get it to work and I've looked over the code about 4 times.
-
1.4.18 works like every other version. What is the problem?
-
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
-
Try the search button, I know it's somewhere on these forums.
-
This mod breaks RCMenu Plugin so it no longer works. Is there a way to have both? I am using 1.4.19 (stable).
-
I've noticed that upgrading the LightBox JS scripts to most current v2.04 would result is the sideshow not working.
-
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.
-
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!
-
I'll look and see what I can do
-
I installed it and the slideshow works fine but when I click on the thumbnail on the main page to go to the image page, it shows the full-sized image instead of the _normal pic. I understand that when you upload a pic..there is a thumbnail image created along with a _normal and then a full size pic. Is it the lightbox error or something else? I got this error after I installed the mod though.
-
Sorry if this is a stupid question, but could you use the same procedure to install the highslide script instead of lightbox? If not, has there been any explanations on how to use highslide for the full size image popup?
thx...
Stephane
-
Keep issues that are related to another mod to the thread that deals with that particular mod. We don't allow cross-postings nor thread drift, especially on announcement threads.
Issues related to the Highlside mod are not meant to go into the lightbox mod thread and vice versa.
-
Hi,
i installed the lightbox and it works perfectly - thanks a lot.
But i have one question - is it possible that lightbox show my pictures in the original size. It looks like that the image with lightbox is a little bit smaller than the original?
Thanks a lot.
-
Sorry - no option to edit my topic.
i forget the info: i made the change in the lightbox_s.js file "var resize = 0;// Set 0 to disable auto-resizing" but the image is smaller than the original :(
-
Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.
What exactly does this mean?
The random images are shown on my startpage, but when I click them I just get a white page.
The links on the random images look like ...cpg/displayimage.php?album=random&cat=0&pos=-5776
When using an unmodified theme the links look the same, but I can click them. So the problem should be somewhere in the theme modification, but I'm using only standard themes which come with CPG 1.4.18.
and btw: Thanks for the excellent work. :)
-
The problem exists only when the logged in user has access to too many pictures.
If he has only access to less than ~4000 pictures the links on the random pics work as usual.
If he has access to more than ~4000 pictures, clicking the random pics leads to a white page.
The problem is independent of $max being 10, 1000 or -1.
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 10; //(-1 for all pics in album)
What can I do, since the random pics are the most enjoyed feature of the users?
(The webserver is mine, dualcore, 2GB RAM and high script runtime.)
-
Ok and here is the solution:
Please be careful, since I do not know PHP and MySQL
-
Ok and here is the solution:
Please be careful, since I do not know PHP and MySQL
Change case 'random' in functions.inc.php
case 'random': // Random pictures
if ($META_ALBUM_SET && $CURRENT_CAT_NAME) {
$album_name = $lang_meta_album_names['random'].' - '. $CURRENT_CAT_NAME;
} else {
$album_name = $lang_meta_album_names['random'];
}
$query = "SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET";
$result = cpg_db_query($query);
$nbEnr = mysql_fetch_array($result);
$pic_count = $nbEnr[0];
mysql_free_result($result);
//if($select_columns != '*') $select_columns .= ', aid, owner_id, owner_name';
$select_columns = '*'; //allows building any data into any thumbnail caption
// if we have more than 1000 pictures, we limit the number of picture returned
// by the SELECT statement as ORDER BY RAND() is time consuming
// /* Commented out due to image not found bug
if ($pic_count > 3000) {
$max_picture_id = 10000;
$i0 = rand(0, $max_picture_id);
$i1 = rand(0, $max_picture_id);
$i2 = rand(0, $max_picture_id);
$i3 = rand(0, $max_picture_id);
$i4 = rand(0, $max_picture_id);
$i5 = rand(0, $max_picture_id);
$i6 = rand(0, $max_picture_id);
$i7 = rand(0, $max_picture_id);
$i8 = rand(0, $max_picture_id);
$i9 = rand(0, $max_picture_id);
$i10 = rand(0, $max_picture_id);
$i11 = rand(0, $max_picture_id);
$i12 = rand(0, $max_picture_id);
$i13 = rand(0, $max_picture_id);
$i14 = rand(0, $max_picture_id);
$i15 = rand(0, $max_picture_id);
$i16 = rand(0, $max_picture_id);
$i17 = rand(0, $max_picture_id);
$i18 = rand(0, $max_picture_id);
$i19 = rand(0, $max_picture_id);
$i20 = rand(0, $max_picture_id);
$i21 = rand(0, $max_picture_id);
$i22 = rand(0, $max_picture_id);
$i23 = rand(0, $max_picture_id);
$i24 = rand(0, $max_picture_id);
$i25 = rand(0, $max_picture_id);
$i26 = rand(0, $max_picture_id);
$i27 = rand(0, $max_picture_id);
$i28 = rand(0, $max_picture_id);
$i29 = rand(0, $max_picture_id);
$i30 = rand(0, $max_picture_id);
$result = cpg_db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE (pid = $i0 OR pid = $i1 OR pid = $i2 OR pid = $i3 OR pid = $i4 OR
pid = $i5 OR pid = $i6 OR pid = $i7 OR pid = $i8 OR pid = $i9 OR pid = $i10 OR pid = $i11 OR pid = $i12 OR pid = $i13 OR pid = $i14 OR
pid = $i15 OR pid = $i16 OR pid = $i17 OR pid = $i18 OR pid = $i19 OR pid = $i20 OR pid = $i21 OR pid = $i22 OR pid = $i23 OR pid = $i24 OR
pid = $i25 OR pid = $i26 OR pid = $i27 OR pid = $i28 OR pid = $i29 OR pid = $i30) AND approved = 'YES' $ALBUM_SET ORDER BY RAND() $limit");
} else {
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";
$result = cpg_db_query($query);
}
$rowset = array();
while($row = mysql_fetch_array($result)){
$rowset[-$row['pid']] = $row;
}
mysql_free_result($result);
if ($set_caption) build_caption($rowset);
$rowset = CPGPluginAPI::filter('thumb_caption_random',$rowset);
return $rowset;
break;
It works perfectly for me, it has only the disadvantage, that I hardcoded the max pid in the code $max_picture_id = 10000;
Currently I have only 7000 pictures, so I made it a bit higher and took 30 random numbers when only needing 12. Otherwise the chosen random pids might not be existant and in that case there would be less random pictures displayed.
I'm sure there is a easy way of getting the max pid with a SQL request out of the database. Feel free to tell me ::)
Can somebody please fix this issue for CPG1.4.19 or 1.5?
One last thing remains:
When I click a random image I'm forwarded to the page with the intermediate image, only the intermediate image does not show. I need to klick it again from the film strip below, then it appears and I can click it to enter the lightbox. Can anybody help? ???
-
Ive added the part with the music in theme.php like this
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" music=\"/music/nocturne.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries
}else{
$picList .= "<a href=\"$picture_url_fullsize\" music=\"/music/nocturne.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
and its not working... all slideshow disabled now... any idea why?? ;)
http://hmr6dobl2ii0.az.pl/shop/
-
*bump*
-
somebody forgot to mention that including the script for player is needed in template.html
AFTER
<link rel="stylesheet" href="scripts/slideshow/css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/slideshow/js/prototype.js"></script>
<script type="text/javascript" src="scripts/slideshow/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/slideshow/js/lightbox_s.js"></script>
ADD
<script type="text/javascript" src="scripts/slideshow/js/swfobject.js"></script>
however... the slideshow is working, the player is showed, the music is not playing in either FF3 or IE7... suggestions?? ideas?? please??
I've tested the whole code separately and the music is playing, in the lightbox slideshow is not...
-
Try setting the correct path to the mp3 file
Change
../scripts/slideshow/music/song.mp3
To
scripts/slideshow/music/song.mp3
-
did that, wasnt working... installed the whole thing again and its working... no idea what was fu**** up... thx for help though
-
me again ;)
in Lightbox v2.02 there was something like this for the music
if (firstTime == 1) {
//firstTime = 0;
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }),
new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ],
{ duration: 0.65, afterFinish: function() { myLightbox.updateNav();} }
);
} else {
//this code was commented out because it causes the music player to restart in Firefox
// new Effect.Parallel(
// [ new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ],
// { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} }
// );
myLightbox.updateNav();
}
in Lightbox v2.03.3, you have this on the other hand
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }),
new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ],
{ duration: resizeDuration, afterFinish: function() {
// update overlay size and update nav
var arrayPageSize = getPageSize();
Element.setHeight('overlay', arrayPageSize[1]);
myLightbox.updateNav();
}
}
);
and it probably makes the music restart now... I tried to fix it however I know too less of this mod to do it... would you lend me a hand??
-
No, the music has always restarted in FF, no idea how to fix that.
The part that has changed has been replaced to another function (updateNav)
-
Well I disabled it for the time being cause I use FF3 however I'm pretty sure I had the music working in Firefox with the 2.02 version though the key navigation wasn't working for me, that's why I had to reinstall to 2.03... the code I pointed out in the 2 versions is the only significant diffrence for this problem, I found... did u Sawey write the 2.02 as well?? cause this part
//this code was commented out because it causes the music player to restart in Firefox
clearly states that there is a fix for music in Firefox, but thats just me ;) I'm too noob in this stuff to figure it out, however u might... cheers!
-
maybe lets brainstorm or something ;)
-
Is there a way to show the lightbox overlay when the slideshow button is pressed?
I tried calling theme_html_picture() in theme_slideshow(), but that just gives me an empty page.
TIA
-Joe
-
Answering my own question...
I changed my theme.php file, copying the template_img_navbar from include/themes.inc.php, and changed this line to add a {SLIDESHOW_PARMS} value:
<a href="{SLIDESHOW_TGT}" {SLIDESHOW_PARMS} class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
And then copying theme_html_img_nav_menu, and modyfing $slideshow_tgt and adding a new value $slideshow_parms:
// $slideshow_tgt = "{$_SERVER['PHP_SELF']}?album=$album$cat_link$uid_link&pid=$pid&a
mp;slideshow=".$CONFIG['slideshow_interval'];
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
$slideshow_tgt = $picture_url;
$slideshow_parms = "rel=\"lightbox[list]\"";
$pic_pos = sprintf($lang_img_nav_bar['pic_pos'], $human_pos, $pic_count);
if (defined('THEME_HAS_NAVBAR_GRAPHICS')) {
$location= $THEME_DIR;
} else {
$location= '';
}
$params = array('{THUMB_TGT}' => $thumb_tgt,
'{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],
'{PIC_INFO_TITLE}' => $lang_img_nav_bar['pic_info_title'],
'{SLIDESHOW_TGT}' => $slideshow_tgt,
'{SLIDESHOW_PARMS}' => $slideshow_parms,
'{SLIDESHOW_TITLE}' => $lang_img_nav_bar['slideshow_title'],
-
Thanks for the addition JoeF!
-
I've got this installed on my sites gallery and it is working except for one thing, in FF when the image pops up, there is no option in right click to save the image to wherever.
So my question is, is there a way to fix this and or make a download icon in the window for the image to be downloaded?
-
It might help someone if I put my web address, wouldn't it?
www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
-
Fix your other issues first: your full-size pics are too large for the browser. Additionally, you have a db issue - when accessing http://www.laura-bertram.com/gallery/displayimage.php?album=random&cat=0&pos=-127 I get There was an error while processing a database query
-
Ok, i fixed the random issue, I also changed the resize function to 1 for auto resize. However what happens now is that the lightbox window is resized and the image rolls off the side and bottom. Now this actually (in an ugly looking way) fixes the download issue so that you can right click on the image that is hanging out to download it.
I guess my next question is, is there a way to make lightbox resize the image without me having to change the actual images and add a download button for the larger image?
Re sizing the the full size images is out of the question since they are for desktop backgrounds.
-
This mod works great. There does seem to be on problem though.
When you exit the slideshow via the escape key, the browser does not load the last image viewed. It just closes the slideshow. This doesn't make much sense to me, b/c it appears to be calling the end function which is suppose to load the most recent image.
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
myLightbox.end();
end: function() {
this.stopSlideShow();
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: overlayDuration});
showSelectBoxes();
showFlash();
slideshow = saveSlideshow;
foreverLoop = saveForeverLoop;
loopInterval = saveLoopInterval;
slideShowWidth = saveSlideShowWidth;
slideShowHeight = saveSlideShowHeight;
if(go_to_last_image_on_exit && imageArray[activeImage][2] != null){
window.location = imageArray[activeImage][2];
}
[/end]
-
Poke ;-)
Ok, i fixed the random issue, I also changed the resize function to 1 for auto resize. However what happens now is that the lightbox window is resized and the image rolls off the side and bottom. Now this actually (in an ugly looking way) fixes the download issue so that you can right click on the image that is hanging out to download it.
I guess my next question is, is there a way to make lightbox resize the image without me having to change the actual images and add a download button for the larger image?
Re sizing the the full size images is out of the question since they are for desktop backgrounds.
Still waiting for some help on this.
-
Poke ;-)
Still waiting for some help on this.
I've looked at your gallery and I had the exact same issue on my gallery but I've since resolved it. Many of my pictures are 3872x2592 and the lightbox script auto-resizes them when displaying them. My problem was caused from not properly reading the directions. I had initially placed the /scripts/slideshow folder in my template directory. I fixed the problem by moving the folder to my /CPG (the root directory for my Coppermine). Maybe you made the same mistake I did.
-
This is truly an awesome mod. It works great, I even added the replacement for the slideshow button. However some questions;
- I would like to have two slideshow buttons, one pointing to the old version and one to the enhanced one, since there still people not having javascript enabled or not having the player installed (of security reasons). Any idea's on that?
- Also I don't use Title and/or comments etc. How can I disable this, since now it shows the filenames, which I dont want.
- I also tried the music bit, but it didnt work, perhaps the mp3 is too big ?? I guess it needs to be loaded aswell.
Any help appreciated
Cath
-
I've looked at your gallery and I had the exact same issue on my gallery but I've since resolved it. Many of my pictures are 3872x2592 and the lightbox script auto-resizes them when displaying them. My problem was caused from not properly reading the directions. I had initially placed the /scripts/slideshow folder in my template directory. I fixed the problem by moving the folder to my /CPG (the root directory for my Coppermine). Maybe you made the same mistake I did.
Thanks for answering,
I have my folders inside the root directory as was specified in the instructions. (/gallery/scripts/slideshow/)
What is interesting is that the lightbox window is resized but the image does not resize and hangs over the edges. The other more important issue is the fact that in FF users can't right click and "save the image as" to download it. I would prefer to fix the second issue first and then worry about the overhang issue later. ;-)
-
FF users can right click to download, but you have to exit the slideshow mode. If you right click the intermediate picture and "click open link in new tab", it will open the full size picture in a new tab which can be saved.
Not a graceful solution, but it's better than nothing.
I tried this (http://www.huddletogether.com/forum/comments.php?DiscussionID=474&page=1#Item_0) and didn't have any luck. But maybe it will work for you.
-
Scratch my previous post. The code supplied on the other link does work. I just didn't realize this mod doesn't use the latest version of lightbox.
Open lightbox_s.js and replace:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
With:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length + "<br><a target=_blank href=" + imageArray[activeImage][0] + ">Click here to save a version of this image</a>");
}
-
This mod works great. There does seem to be on problem though.
When you exit the slideshow via the escape key, the browser does not load the last image viewed. It just closes the slideshow. This doesn't make much sense to me, b/c it appears to be calling the end function which is suppose to load the most recent image.
It should be working, as it works on my gallery. I can't help you as I can't access your gallery.
Poke ;-)
Still waiting for some help on this.
You should not edit the style of the lightbox script, only if you know what you're doing.
delete the folowing lines from your style2.css:
#lightbox img {
height:auto;
width:auto;
}
The rightclick "Save As" won't work, as the script creates a mask in front of the image to allow for navigation to the next and previous images,
you'll have to come up with a solution yourself.
P.S.: You won't be able to do this in IE as well
This is truly an awesome mod. It works great, I even added the replacement for the slideshow button. However some questions;
- I would like to have two slideshow buttons, one pointing to the old version and one to the enhanced one, since there still people not having javascript enabled or not having the player installed (of security reasons). Any idea's on that?
- Also I don't use Title and/or comments etc. How can I disable this, since now it shows the filenames, which I dont want.
- I also tried the music bit, but it didnt work, perhaps the mp3 is too big ?? I guess it needs to be loaded aswell.
Any help appreciated
Cath
To have 2 slideshow options, undo the changes you made to enable the lightbox slideshow with the slideshow button.
Then, if you already have $template_img_navbar template, replace it with the one below
(if you don't have it yet, just paste it in your theme somewhere at the top)
This way, people who have javascript enabled will see the lightbox slideshow, and people who don't have it, will see the regular slideshow.
[edit:] I added an 'id' tag to the slideshow link as well as a little javascript, please replace your copy with this one
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT
<tr>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0" alt="{THUMB_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0" align="middle" alt="{PIC_INFO_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{SLIDESHOW_TGT}" rel="lightbox[list]" id="slideshow_link" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
<script type="text/javascript">
window.onload = function(){
var images = document.getElementsByTagName('img');
for(i = 0; i < images.length; i++){
if(images[i].className == 'image'){
$('slideshow_link').setAttribute('href', images[i].src);
break;
}
}
}
</script>
</td>
<td align="center" valign="middle" class="navmenu" width="100%">
{PIC_POS}
</td>
<!-- BEGIN report_file_button -->
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
</td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif" border="0" align="middle" alt="{ECARD_TITLE}" /></a>
</td>
<!-- END ecard_button -->
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif" border="0" align="middle" alt="{PREV_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif" border="0" align="middle" alt="{NEXT_TITLE}" /></a>
</td>
</tr>
EOT;
To remove the title, don't insert the title in the link.
You can do this by editing the second part of the lightbox update in your theme.php:
FIND:
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\">";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries
}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
REPLACE WITH:
if ($picture['pid'] == $pid && !$pic_already_shown ) {
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" >";
$picList .= "<img src=\"$picture_url\" class=\"image\" border=\"0\" alt=\"$lang_display_image_php[view_fs]\" /><br />";
$picList .= "</a>\n";
$pic_already_shown = true; //fix to remove duplicate entries
}else{
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" ></a>\n";
}
The music should be preloading in the background, but it still has issues in FF. I wouldn't spend to much time on that rather put a player in your theme or so.
-
Scratch my previous post. The code supplied on the other link does work. I just didn't realize this mod doesn't use the latest version of lightbox.
Open lightbox_s.js and replace:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
With:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length + "<br><a target=_blank href=" + imageArray[activeImage][0] + ">Click here to save a version of this image</a>");
}
Great solution, hadn't thought about that (though it is super logic :) )
I'm going to add it to my script as an option.
-
I wish I could take credit. Unfortunately, I'm better with Google than I am with coding (other than C).
-
It should be working, as it works on my gallery. I can't help you as I can't access your gallery.
You can now with this information.
My Gallery (http://www.loopfamily.net/CPG)
username: testuser
password: testuser
-
I hadn't read that it only happens when using the escape button,
I guess this is a browser limitation:
-> you hit escape during the slideshow
-> javascript tells browser to move to next page
-> because escape is pressed, this action is canceled
you can close the lightbox with other buttons as well ('x', 'o' and 'c')
-
Is there is another javascript command associated with the escape key, aside from the one I posted?
Because the code I posted shows that the escape key calls the same function as clicking on the x.
Either way, it's probably not a big enough concern to worry about finding the source of the problem.
-
The only thing I can say is what I wrote in the post above.
by pressing escape you actually cancel the action invoked by pressing it.
-
Thanks guys, that worked :)
http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)
http://www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
-
To have 2 slideshow options, undo the changes you made to enable the lightbox slideshow with the slideshow button.
Then, if you already have $template_img_navbar template, replace it with the one below
(if you don't have it yet, just paste it in your theme somewhere at the top)
This way, people who have javascript enabled will see the lightbox slideshow, and people who don't have it, will see the regular slideshow.
Ok the title remove works great.
To have 2 slideshow options, I got error message about report file button, but added those line from the themes.inc.php
When NOT logged in I get error message upon clicking the foto to get intermediate... :
Template error
Failed to find block 'ecard_button'(#(<!-- BEGIN ecard_button -->)(.*?)(<!-- END ecard_button -->)#s) in :
<tr>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="images/folder.gif" width="16" height="16" align="absmiddle" border="0" alt="{THUMB_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="javascript:;" class="navmenu_pic" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{SLIDESHOW_TGT}" class="navmenu_pic" rel="lightbox[list]" title="{SLIDESHOW_TITLE}"><img src="images/slideshow.gif" width="16" height="16" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" witdh="100%">
{PIC_POS}
</td>
<!-- BEGIN report_file_button -->
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="images/report.gif" border="0" align="absmiddle" alt="{REPORT_TITLE}" /></a>
</td>
<!-- END report_file_button -->
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/prev.gif" width="16" height="16" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/next.gif" width="16" height="16" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
</td>
</tr>
I take it has something to do with the function disabling the ecard function since When logged in that doesnt happen since the e-card button is now present and the intermediate picture is presented.
Upon clicking the foto the Lightbox function works as useall since I have Java working.
BUT upon clicking the slideshow button i get a small starting box with image circling but nothing happens, upon clicking this you get returned..... ?????
so its not quite working (I havent tried without java since i have to find first how to disable this)
This is the site: http://www.fotofantastic.nl
By the way, I saw with debug on following message:
/themes/rainy_day/theme.php
* Notice line 279: Undefined variable: picList
-
Ok, I have the template error fixed, it was only needed to add the lines <!-- BEGIN ecard_button --> <!-- END ecard_button --> into the theme.php at the part of the menu_bar.
But the Slideshow button still gives a problem.
Thanks in advance
Greetz Cath
-
Sorry for the Template error, I used an old template for that, I have updated the code in my previous post.
I'm also updating the instructions for the correct link, I made a mistake in that on as well :)
[edit:] I edited the instructions.
-
Sorry for the Template error, I used an old template for that, I have updated the code in my previous post.
I'm also updating the instructions for the correct link, I made a mistake in that on as well :)
[edit:] I edited the instructions.
Thanks, that worked great, the only thing I see since I removed the title, sometimes it just shows just like 1 from 7, and other times it says slideshow and on the next line 1 from 7. Nothing problematic, just strange that it is on/off.
Is it also possible to disable the one when clicking on the photo, since now with the slideshow button I dont see the need for it, without disrupting the system offcourse.
And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...
-
Hi there I noticed some other strange behaviour from the lightshow when used through the slideshow button, it opens the first picture in intermediate format, then when you click play, it reloads the first picture in bigger format (the way it should have been in the first place), this also means that in my case instead of 7 pictures, it states there are 8 pictures.....
When clicked on the picture it opens the lightshow inmidiatly with the bigger format. So there is a difference in operating.
-
Thanks, that worked great, the only thing I see since I removed the title, sometimes it just shows just like 1 from 7, and other times it says slideshow and on the next line 1 from 7. Nothing problematic, just strange that it is on/off.
Is it also possible to disable the one when clicking on the photo, since now with the slideshow button I dont see the need for it, without disrupting the system offcourse.
And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...
Let me rephrase this post; I want to use the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html)
It creates a empty image with the picture so that the picture itself is somewhat protected to unauthorized copying (both on intermediate and full picture level). However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate. The showing of the full picture would in that case also somewhat protected I guess, but the intermediate is not protected.
If there is no solution I would have to revert to something else for either one of them.
And another thing, I noticed the timeout setting from the config does not work, i changed it to 10 seconds, (10000), but in time I saw nothing change.
But when a photo takes sometime to load the background is rather white, that really flashes from the screen, is it possible to change that colour??
For instance to gray or black...
-
Ok guys, now that I've got it working, thanks alot on that by the way. I have a question. I know the slideshow won't work with videos, however, one my galleries has some video catagories and I was wondering if there was a way to turn off the slideshow in those catagories? I noticed that the videos weren't working so I disabled the slideshow for now until someone comes up with an idea. (If possible)
you can check out that gallery here; http://www.tardis1916.com/dragoncon/index.php (http://www.tardis1916.com/dragoncon/index.php)
I know this might be a mind bender so I offer a heartfelt thanks and I have a bottle of asprin for those who need it ;-)
-
I implemented this a while ago but did not realize my count was not working correctly. When you click on a image that isn't the first image to view in lightbox it starts the count over so the images will start over in the slide show. For example if I'm on image 50 of 100 it will start back over at 1 instead of going to 51 when I click next. Since our gallery is private just ask and I will set you up a user and send the user info and url in pm. I would appreciate any help though. I have been trying to trouble shoot this myself and have not been able to correct it. I didn't see anyone else having this problem.
-
Go ahead, send me the info so I can take a look.
-
I tried this mod, read all the pages, and found someone touched on this issue, but I could not locate an answer.
I just installed Coppermine (latest release) after using Gallery2 for a year. I have it in a subdirectory for testing purposes. I am using the i3theme (Midnight). I modified the files according to this thread - I hope.
Here's the problem...
When at the home page, there are thumbnails for "Random Files" and "Last Additions". If I click any of the thumbnails, I get the following: "Critical error
There was an error while processing a database query".
I get this error from the home page thumbnails and when clicking on the thumbnails on any of the category "Random Files" and "Last Additions". However, when I click to go to album and view the album images, those thumbnails work fine.
The URLs that do not work seem to all have "...?album=random..." or "...?album=lastup..." in them.
Any ideas?
Help is appreciated. Thank you!
Mike
(test installation) http://www.thephotositook.com/cpg
-
I can't edit my previous post?
Update: I went to another thread to install the lightbox (lightbox JS for fullsize image) without the slideshow. It works fine.
-
Is there no answer to this one?
Is it also possible to disable the lightbox one when clicking on the intermediate photo, since now it works with the slideshow button. I would like to use on the intermediate the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html).
However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate.
Please let me know if there is or is no solution.
Thanks
Cath
-
Hello and thanks for mod is very very good, and it is a option to integrate in next versions of cpg, but i have a problem :(
Is there no answer to this one?
Is it also possible to disable the lightbox one when clicking on the intermediate photo, since now it works with the slideshow button. I would like to use on the intermediate the prevent right click from stramm (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html).
However this collides unfortunately with the normal working of the lightbox, since this also activates upon clicking the intermediate.
Please let me know if there is or is no solution.
Thanks
Cath
I have the same problem, but i doesn't use the stramm mod (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html (http://forum.coppermine-gallery.net/index.php/topic,32548.0.html)), i used the RC Menu plugin (http://forum.coppermine-gallery.net/index.php/topic,33377.0.html (http://forum.coppermine-gallery.net/index.php/topic,33377.0.html)), and the full-size access plugin, these two last aren't working... (site: http://www.macarenissima.com/galeria/ (http://www.macarenissima.com/galeria/)).
Thanks for reply and happy new year!
-
I don't have an answer for your question as I dropped development of this plugin. I am working on a new one for the next version of Coppermine that will be much easier to configure and do all the things you want.
You'll have to have a little patience...
-
I don't have an answer for your question as I dropped development of this plugin. I am working on a new one for the next version of Coppermine that will be much easier to configure and do all the things you want.
You'll have to have a little patience...
Sugestion: Please use SexyLightBox, (link (http://www.coders.me/web-html-js-css/javascript/sexy-lightbox-2)) a clone, sexier and more lightweight, the classic Lightbox. It was built thinking of the web designers, easy to install and use.
-
I'm currently coding my own port to jQuery, which will be lightweight, but can grow when needed as well.
-
Thanks for this excellent tool. I successfully saw the full screen slideshow on my coppermine gallery.
But after some time, the slide show feature is not working!
I have attached my theme.php and template.html.
My gallery: http://dilip.nijagal.com/photo_gallery/thumbnails.php?album=5
-
I just replaced the lighbox_s.js file with original copy and it started working again.
In the diff, I found no changes though!
I have another issue:
Slideshow is very slow. It keeps loading for a long time.
Any bug there?
-
@nmdilipsimha:
The slow loading probably is because the full size images take some time to load, try loading one (i.e. http://dilip.nijagal.com/photo_gallery/albums/mumbai_trip/malshej/DSC06107.JPG) in your browser and you'll see what I mean.
-
Yes Sander.
Probably some Cumulo-Nimbus (CuMb) (clouds ;D )
Very heavy and dangerous clouds ;)
-
Hi
does anybody know why if I start a slideshow in one of my albums, it always shows photos from 1 to 11 and then it ends?
See at http://www.flapane.com/gallery/
-
Please read the instructions more carefully, it is explained in there:
The slideshow, by default, only takes the next 10 images in the album, this to prevent overloading big albums.
If you want to change that, you will have to do this in your theme.php function 'lightbox_list()'.
The first line of that function has a variable to set the maximum images for a slideshow.
-
My bad, I don't know how I didn't see that piece of the guide.
-
I installed your mod. I have Cpg integrated with mehdi Plugin with Joomla.
When i click on a picture lightbox opens and seems to work, but the lightbox screen is white!?
What is wrong?
Link: bar-racuda.de/fotos
thanks for helping and providing such a beautyful mod.
Greets
Low-deluxe
-
I think the problems is that you are using mootools, jquery and prototype all together.
I don't know how to fix your problem, it might be better to use something like highslide or so (for which a CPG mod is available as well), as it is already loaded on your page.
-
well actually i don`t think i am using this kind of stuff... !?
I didn`t install it...
Couldn't it be something else?
Greets
low-deluxe
-
ah well. I installed another picture gallery which is still running, because i can`t get coppermine the way i like it ;-)
Would deinstall it help?
-
No it won't.
-
Does the photos gets their view counter increased while one is watching them trough lightbox?
I can't verify as visits from my ip aren't counted.
-
ne1? :)
-
No, links aren't counted with lightbox slideshow
-
Ah, ok. Do you think it will be implemented one day?
thanks
-
Yes, but not in the CPG1.4 version
-
quick and dirty hack to count views at lightbox
first u need to edit lightbox_s.js
add this function after the global vars near line 140-150
function download_counter(id){
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
document.getElementById("target").innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("POST", "addHit.php", false);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
xmlHttp.send('pid='+id);
}
find "showImage: function()" and add patch it like this:
from:
this.preloadNeighborImages();
to:
this.preloadNeighborImages();
download_counter(imageArray[activeImage][3]);
next find this:
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage')));
and patch it like this:
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage'), anchor.getAttribute('pid')));
now u have to patch your theme.php:
find:
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\" >";
and replace with:
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" pid=\"$picture[pid]\" title=\"$pic_title\" >";
comments are welcome
-
sry one file is missing and cant find the mod/edit button.
you need to create a file called "addHit.php" in your cpg dir.
<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
if (isset($_POST['pid'])) {
// Add 1 to hit counter
$pid = (int)$_POST['pid'];
if (isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
user_save_profile();
}
}
?>
-
hi,
just a note:
Step 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.
Quote from: Nibbler on January 28, 2007, 08:43:13 PM
I don't know if this is a bug or not, doesn't cause problems on its own.
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() LIMIT $limit2";
change to
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";
this has changed in 1.4.21! you can still replace the existing code with the "change to" code but you have to remove these two lines instead of just one.
$limit_random = $limit2 ? 'LIMIT '.$limit2 : '';
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
-
Thanks for the note
-
Hello all!
I installed this great tool on all my galleries and it's been working great! I have run into one issue and that is the text below an image is the same color as the background. Where in the css do I change the font color to black?
-
can you give a url to your website?
-
LOL, that would have helped, wouldn't it?
http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)
&
http://www.laura-bertram.com/gallery/ (http://www.laura-bertram.com/gallery/)
-
It is your main stylesheet what is forcing the white color on the texts, you can prevent this by editing lightbox.css:
in #imageDataContainer, add:
color: #000000;
also add a new class:
#imageDataContainer a{
/*add the style for links in here*/
}
-
Thanks so much! I knew it was something with my site CSS but couldn't figrue out how to fix it. ;D
Now for another question, this one is more complicated and I'm not sure it would be possible but if you look at one of my images withen the gallery, I have 4 sometimes 5 or 6 different sizes of an image for different size resolutions. I have links withen the file information for the different sizes but wonder if it would be possible to have different sizes added to the popup where it says, click here to download this size, and beneath that another link for the next size and so forth?
ie, instead of just saying, "Click here to save a version of this image" have it say
Click here to save a 1920x1080 of this image
Click here to save a 1920x1200 of this image
Click here to save a 1600x1200 of this image
Click here to save a 1280x1024 of this image
Click here to save a iphone version of this image
and have the links actually point to the actual images. I personally think that would require codeing each image which if you can see, i have lots of images.
http://www.laura-bertram.com/gallery/index.php (http://www.laura-bertram.com/gallery/index.php) & http://www.trance-gemini.com/gallery/ (http://www.trance-gemini.com/gallery/)
-
It certainly is possible, but I don't have the time to do this for you. If you know javascript, then you should look at line 661
(you will have to pass all the links from your pic info via php to javascript)
If you can't do it yourself, try the freelancers board.
-
sry one file is missing and cant find the mod/edit button.
you need to create a file called "addHit.php" in your cpg dir.
<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
if (isset($_POST['pid'])) {
// Add 1 to hit counter
$pid = (int)$_POST['pid'];
if (isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
user_save_profile();
}
}
?>
Hi
I have just read your pm!
Thanks I have did the mod, even if I still don't know if it works, I have to wait some visitor to see my photos and then check if the counter get increased, as I as an admin can't increase my visit counter.
What does the js lightbox dev think? Did you or other users try it?
-
I've tried it too. However, my site is a small family site and like you, I cannot test this myself. I have no idea how people view the pictures on my site, so I can't tell where the hits are coming from. I suppose I can go to a wi-fi hotspot and test the mod out.
-
I must say that when I wrote that post, I wrote down the number of gallery visits, and it was 19706.
Now it is 19770, but either people used lightbox or not, I don't know... I suppose we should try a reciprocal test on our websites.
-
Firefox 2 has just been crashed and it keeps crashing if you open lightbox photos picking them from RANDOM IMAGES.
-
chickchick mod does work, tested on my own site.
A few edits are required if you want to use addHit.php file from this mod (http://forum.coppermine-gallery.net/index.php/topic,9262.msg104242.html#msg104242), which adds standard slideshow views to hit counter: change
xmlHttp.open("POST", "addHit.php", false);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
to
xmlHttp.open("GET", "addHit.php", false);
-
you can still replace the existing code with the "change to" code but you have to remove these two lines instead of just one.
$limit_random = $limit2 ? 'LIMIT '.$limit2 : '';
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
Just change
$limit_random = $limit2 ? 'LIMIT '.$limit2 : '';
to
$limit_random = $limit2 ? 'LIMIT '.$limit2 : $limit;
No more edit needed.
Sawey please review step 7 in installation instructions accordingly.
-
So you don't confirm the bug?
-
What bug? ???
-
« Reply #166 on: Today at 12:41:55 PM »
-
No issue with random images slideshow in Opera 9.64. I'm running 1.4.20 patched, not 1.4.21
-
mmmh got it. Please could you see if it works on my gallery too? It could be Firefox and I can't test other browsers atm, but it sounds strange.
It doesn't happen if you slide album images but only if you pick images from RANDOM section.
-
Tried with Firefox 2.0 and yes, it freezes.
I'm going to test it after having removed chickchick's mod.
-
Thanks for your help, I hope chikchick sees my pm and reads our posts.
-
Hi, may somebody know why in my Lightbox slideshow the bottom starts first and only then
picture popup. Its not so nicely to view. :(
http://vidmas.xz.lt/
sorry with my poor english :)
-
I'm going to test it after having removed chickchick's mod.
Without the mod, no issue with random pctures slideshow. There must be a reason and I must find it ;D ;)
-
ok meanwhile I'd better stick to the original lightbox mod ;D
-
I've converted this mod into a plugin. Right now, it can only be customized by editing the codebase.php file. I hope to release a future version with a menu based configuration.
-
Please start a separate standalone thread on the plugin board with your plugin announcement. A moderator will move it accordingly. Here in this thread online the mod flavor should be discussed, as we're trying to keep mods and plugins separated.
-
Woo hoo!! Thanks for the mod, I have just switched to Coppermine and REALLY wanted to figure out how to make lightbox work. I tried some other manuel fixes but not having a lot of time to trouble shoot, this one worked FIRST TIME!yay! :D
-
hello
some prob with slideshow and slider.
i've wrote in the slideshow-thread:
"when i click on a pic in the slider i get an database-error (Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten).
i use the slideshow-mod, not enlargeit. could this be the problem ?"
and i get this answer: "This thread is about the plugin, not the mod. Go to the mod thread."
so i would be very happy if someone could help with this and don't say, i should "go" somewhere else :-\
thx.
-
sorry ... i mean "slider-thread" ... it's late ...
hello
some prob with slideshow and slider.
i've wrote in the slideshow-thread:
"when i click on a pic in the slider i get an database-error (Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten).
i use the slideshow-mod, not enlargeit. could this be the problem ?"
and i get this answer: "This thread is about the plugin, not the mod. Go to the mod thread."
so i would be very happy if someone could help with this and don't say, i should "go" somewhere else :-\
thx.
-
I have no idea what slider you are using, can you give a link to your gallery?
-
I have no idea what slider you are using, can you give a link to your gallery?
hello
this is the slider i use: http://forum.coppermine-gallery.net/index.php/topic,51324.0.html (http://forum.coppermine-gallery.net/index.php/topic,51324.0.html)
and this is my site: http://www.hasnobrain.com/cpg14x/index.php (http://www.hasnobrain.com/cpg14x/index.php)
-
hello again
problem solved !
it was the "old" random problem:
I found this to solve the problem and now it works:
In your file include/functions.inc.php find
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
Change to:
Code:
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";
-
Hi,
first of all - thanks a lot for this great modification!!
But i have one problem - all pictures that i show with this lightbox are much more darker then the original picutre. is there any parameter where i can change this?
You can have a look here/url]
I hope somebody can help me.
best regards (http://phatair.bplaced.net/evol-eno/gallery/thumbnails.php?album=35)
-
Hm...ok this problem is only with FireFox on my desktop PC. With IE on my desktop PC all is fine and on my notebook its ok on the firefox, too. So i dont know what this is ...
-
Hi everybody,
I applied this mod to cpg 1.4.25 and I encountred the same old problem of random photos and last posted photos. Noone of the solution proposed worked! The solution was modifing the theme.php like this:
version proposed in the mod:
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 100; //(-1 for all pics in album)
################################################
global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = (empty($_GET['album'])) ? $picId['aid'] : $_GET['album'];
corrected versione:
function lightbox_list($picId) {
################################################
//Set max number of images
$max = 100; //(-1 for all pics in album)
################################################
global $lang_display_image_php, $CONFIG;
$i = 0;
$pid = $picId['pid'];
$aid = (empty($_GET['album']) || $_GET['album']=='random' || $_GET['album']=='lastup') ? $picId['aid'] : $_GET['album'];
bye bye
pietro
ps: I apologize for my bad English!
-
Nice work - I was just now able to apply your mod. to the LightBox plugin.
It seems to solve the same problem there too.
-
Hello I was wondering if possible could give me any help with this lightbox mod, it is very nice mod but when I use Internet explorer I can not view the flash files in the gallery all I get is a blank screen but can hear audio. If I use firefox then it works fine.
I have these mods currently installed.
Another FLV Player
LightBox JS for Fullsize Popup Slideshow
Uninstall Mods
Enlargeit
I was going to disable Enlargeit (even uninstalled it) but even when that still get a blank page when viewing flash files, images all work fine. Well after working with the code and pulling different code off I found that everything works if I do not use the Lightbox, but once I add the lightbox the flash files will no longer work (even if enlargeit is uninstalled). So I am guessing there is a conflict between the "Another FLV Player" and the "LightBox JS for Fullsize Popup Slideshow" mods.
If you need this information I am not trying to use the lightbox for the video files only the images. Does anyone know about this kind of problem? if so is there a solution like changing piece of the code?
Links to gallery
Regular user one (set up without lightbox)
http://www.beautifuljodelle.com/gallery/index.php?theme=default (http://www.beautifuljodelle.com/gallery/index.php?theme=default)
One with lightbox set up
http://www.beautifuljodelle.com/gallery/index.php?theme=image_media (http://www.beautifuljodelle.com/gallery/index.php?theme=image_media)
Besides the gallery banner and color of the site and of the course the code for lightbox the coding of the two are the same.
Please and Thank You for any help.