Advanced search  

News:

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

Pages: 1 ... 10 11 12 13 [14] 15 16 17   Go Down

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

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: LightBox JS for Fullsize Popup Image
« Reply #260 on: September 25, 2007, 11:44:23 am »

Dragonfly (aka CPG for Nuke) is a distant relative to Coppermine. It has little in common with our code, since both apps forked long time ago. We can not advice, as we don't know how Dragonfly works. Ask for support on the Dragonfly community. If they can't help, you're stuck: we don't provide DF support at all.
Logged

Jo0Lz

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
  • I'm not lost, I'm locationally challanged...
    • Fok! Forum Junkies!
Re: LightBox JS for Fullsize Popup Image
« Reply #261 on: September 25, 2007, 12:40:17 pm »

Dragonfly (aka CPG for Nuke) is a distant relative to Coppermine. It has little in common with our code, since both apps forked long time ago. We can not advice, as we don't know how Dragonfly works. Ask for support on the Dragonfly community. If they can't help, you're stuck: we don't provide DF support at all.

CPG-Nuke is now DragonFly CMS, but I feel the community is bleeding. Lots of people are taking their distance from the CMS, because of the path the CMS has taken... I feel the support has died completely, lot's of things that I have on my site, are the things I managed to code/hack in myself.

Now, I have to say, the CMS is great. Functions great and the new ForumsPro is great aswell. Even if I wanted to switch over to another CMS, there is no easy way, to migrate. For the forums, I have all the awnsers, but coppermine, I can't get it to migrate, because of differences with current coppermine releases.

But, I've just managed to get the lightbox functionality into my Coppermine gallery! :D
After all that i've manually altered on my DF board, I'm almost becoming a developer :o

Thanks for your reply, GauGau.
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #262 on: October 22, 2007, 04:32:53 pm »

Hi,

Lightbox is a really nice mod (a view count is still missed :( )
It`s in principle working on my website http://www.meyers-web.de, but only with larger pictures Album e.g. http://meyers-web.de/thumbnails.php?album=47 (800x600) and not with all the other albums (640x480).
I found this hint:

Quote
I don't think anything is wrong in your code, your images are just to small.
When they fit in your page, no lightboxlist is created.

If you always want the lightbox to work, then you have to change some code in the first part of the update:

change:

Code:
        if (isset($image_size['reduced'])) {
#################################################
           //First part of lightbox update         
           $pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);
           //End of first part
#################################################
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }

to:

Code:
#################################################
           //First part of lightbox update         
           $pic_html = lightbox_list($CURRENT_PIC_DATA['pid']);
           //End of first part
#################################################

I have tried this, but then i got "click to enlarge" This is not what i expect.
SaWey can you help me or somebody else to get it work with smaller pictures

Thanks and regards

merlin6666
Logged

riderhk

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Image
« Reply #263 on: October 22, 2007, 06:18:15 pm »

Summary of how to get the Lightbox thingy working:
Step 3. Download slideshow.zip from http://ahavriluk.home.comcast.net/slideshow.zip.

I'm sorry but the link slideshow.ziip mentioned can not be reached, please let me know where I can download the zip file. Thanks in advance.
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #264 on: October 22, 2007, 07:19:48 pm »

Hi riderhk,

attached slideshow.zip ....

Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #265 on: October 22, 2007, 07:47:30 pm »

...

What do you mean by "click to enlarge", it should work like the bigger sized pics.
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #266 on: October 22, 2007, 08:04:12 pm »

Now i have changed the theme.php with your code for small pictures and you can see what happened.

No pictures appears only a link "click to enlarge" or in German "Klicken für Bild in voller Größe"

But now lightbox opened. 
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #267 on: October 22, 2007, 08:05:56 pm »

@riderhk: you have to login to see attachment`s
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #268 on: October 22, 2007, 08:14:39 pm »

Ah, yes, this problem occurred but didn't post the solution:

in the second part of the lightbox_update

FIND:
Code: [Select]
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($picture, 'normal');
} else {
$picture_url = get_pic_url($picture, 'fullsize');
}

AFTER, ADD:
Code: [Select]
if(!file_exists($picture_url)){
$picture_url = get_pic_url($picture, 'fullsize');
}
[/s]

This should work
« Last Edit: October 22, 2007, 08:21:08 pm by SaWey »
Logged

riderhk

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox JS for Fullsize Popup Image
« Reply #269 on: October 22, 2007, 08:31:53 pm »

Thanks to merlin6666 and SaWey, it works great.
http://album.biker.com.hk/gallery/index.php
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #270 on: October 22, 2007, 08:56:29 pm »

Thanks SaWey,

its better working, but unfortunately not perfect.

The normal picture doesn`t change, if you click on another thumbnail.
Everytime the first picture of the album will be shown, after closing lightbox.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #271 on: October 22, 2007, 11:26:44 pm »

Are you sure you have something like this:

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

foreach ($pic_data as $picture) {
if ($i >= $down && $i <= $up){
if($CONFIG['thumb_use']=='ht' && $picture['pheight'] > $CONFIG['picture_width'] ){
  $condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $picture['pwidth'] > $CONFIG['picture_width']){
  $condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']){
  $condition = true;
}else{
$condition = false;
}
$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');
}
if(!file_exists($picture_url)){
$picture_url = get_pic_url($picture, 'fullsize');
}
$picture_url_fullsize = get_pic_url($picture, 'fullsize');
$pic_title = ($picture['title'] ? $picture['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($picture['filename'])), "_", " "));
if ($picture['pid'] == $pid) {
$picList .= "<a href=\"$picture_url_fullsize\" music=\"scripts/slideshow/music/test.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=\"scripts/slideshow/music/test.mp3\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\"></a>\n";
}
}
}
$i++;
}
return $picList;
}//End of second part
#################################################
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #272 on: October 23, 2007, 09:24:15 am »

Hi SaWey,

i have modified the second part from the post before.
Current status is: I can not see any normal picture.
Attached my theme.php
I hope you can find a solution

Many thanks
 merlin6666
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #273 on: October 23, 2007, 12:45:13 pm »

Try replacing the second part of the update with the above one, as you haven't changed the code correctly.

you removed this code:
Code: [Select]
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($picture, 'normal');
} else {
$picture_url = get_pic_url($picture, 'fullsize');
}
Logged

merlin6666

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: LightBox JS for Fullsize Popup Image
« Reply #274 on: October 23, 2007, 04:23:11 pm »

Sorry to bother you again, I have inserted the missed code, but i still see no intermediate picture  :(
Attached my theme.php (blackbirch)
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #275 on: October 23, 2007, 05:32:36 pm »

I can't find anything wrong atm, maybe you should start from scratch with this plugin...
With all I said, it works on my install.
Logged

hell

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Your Hardware Madness
Re: LightBox JS for Fullsize Popup Image
« Reply #276 on: October 24, 2007, 01:02:26 pm »

Can anybody attach the modification files on theme fruity please, because i try 3 days to make it work but nothing please ..
Logged

technozeus

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • ilfra.it
Re: LightBox JS for Fullsize Popup Image
« Reply #277 on: October 27, 2007, 04:10:05 am »

Hi, first this mod is graet! ;D
It works all fine but I have a little problem: I can't see the next and previous buttons.
You can see an example HERE.
In the template.html I add this code:
The pats are correct and the files are in...
Thank for your help!
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #278 on: October 27, 2007, 04:36:46 am »

That is because you haven't followed the steps correctly, look a little back in the thread till you get to the last complete instructions.
Logged

technozeus

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • ilfra.it
Re: LightBox JS for Fullsize Popup Image
« Reply #279 on: October 27, 2007, 12:54:44 pm »

Now it works, I've missed a little mod in the mod of code ;D
sorry and thanks for your great job!
Logged
Pages: 1 ... 10 11 12 13 [14] 15 16 17   Go Up
 

Page created in 0.025 seconds with 20 queries.