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 ... 5 6 7 8 [9] 10 11 12 13 ... 17   Go Down

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

0 Members and 1 Guest are viewing this topic.

Kenshino

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: LightBox JS for Fullsize Popup Image
« Reply #160 on: April 21, 2007, 07:10:50 pm »

Thanks for your reply!

Are there any changes I'll need to make to LightBox's additions to theme.php to make LyteBox work?
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #161 on: April 21, 2007, 07:25:26 pm »

Yes, but you will have to check with the website to know what.
for example: change "lightbox[ list]" to "LyteBox[ list]" or something.
Logged

kissman

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: LightBox JS for Fullsize Popup Image
« Reply #162 on: May 01, 2007, 04:07:26 pm »

I edited my Classic theme, lightbox working, but i cannot view gallery graphics...  :-[ ??? my gall: http://air-spotting.pichrt.info
Logged

SaWey

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

Have you checked for the existance of the images dir of that theme?
I think you may have removed that one.
Logged

kissman

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: LightBox JS for Fullsize Popup Image
« Reply #164 on: May 01, 2007, 04:48:34 pm »

Have you checked for the existance of the images dir of that theme?
I think you may have removed that one.
i checked, and images dir is in themplate dir ok... maybe bad paths in theme files?
Logged

kissman

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: LightBox JS for Fullsize Popup Image
« Reply #165 on: May 01, 2007, 04:58:09 pm »

Solved: i changed name of theme but i forgot rename in template.html  ;) sorry
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #166 on: May 01, 2007, 04:59:00 pm »

I checked your site logo and it should be at
http://www.pichrt.info/air-spotting/themes/classic/images/site_logo.png

can you verfy that?

OK, nice one :-)
Logged

jrexi

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: LightBox JS for Fullsize Popup Image
« Reply #167 on: May 02, 2007, 06:15:21 pm »

Hi All,

First off I want to say thanks for this mod, it is simply awesome!

My question is, how can I have the Lightbox launch earlier in the process and not wait until the full image stage?  For example, I want the lightbox to launch from the thumbnail stage instead of the page where you can enter comments and ratings.

Thanks in advance for your help.

Jrexi.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #168 on: May 03, 2007, 05:49:45 pm »

You will find something like that in this thread: http://forum.coppermine-gallery.net/index.php?topic=36558.180
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #169 on: May 03, 2007, 10:52:11 pm »

Hi SaWey... really great mod.  Thanks for this !  I was wondering how hard it would be to add more functionality to the actual popup.  Could there be other buttons sandwiched between the pic title and the close button?   For example maybe an add to favorites link or other stuff from the info panel, links from the sys or sub menu.   I imagine this might be some pretty major programming but if anyone has an idea for a fairly quick and easy way to mod this I would love to hear it. 

Thanks again.. love this ! ;D
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #170 on: May 04, 2007, 12:49:26 am »

I changed my code of the script again, now whenever a user exits the lightbox slideshow, he gets redirected to the page of the image where he stopped.

A few changes are necesarry:

in lightbox_s.js:

Find (line 413):
Code: [Select]
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));

Replace with:
Code: [Select]
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'), imageLink.getAttribute('picpage')));

Find (line 421):
Code: [Select]
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));

Replace with:
Code: [Select]
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage')));

Find (line 852):
Code: [Select]
end: function() {
this.stopSlideShow();
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: 0.2});
showSelectBoxes();

slideshow = saveSlideshow;
foreverLoop = saveForeverLoop;
loopInterval = saveLoopInterval;

slideShowWidth = saveSlideShowWidth;
slideShowHeight = saveSlideShowHeight;

After add:
Code: [Select]
window.location = imageArray[activeImage][2];


And then in your theme.php file:

Find:
Code: [Select]
function lightbox_list($picId) {
    global $lang_display_image_php;

$i = 0;
$pid = $picId;
$pic_data = get_pic_data($_GET['album'], $pic_count, $album_name, -1, -1, false);
foreach ($pic_data as $picture) {
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;
}

After add:
Code: [Select]
$picture_page = "./displayimage.php?album=".$picture['aid']."&pos=-".$picture['pid'];

Find:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" rel=\"lightbox[list]\"

Replace with:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\"

Find:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" rel=\"lightbox[list]\"

Replace with:
Code: [Select]
$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\"

(above is mentioned twice as you have to change 2 lines that are the same)

That's it.
Enjoy

@zac: It is possible to do so, you just need to edit the lightbox_s.js script to your needs.
« Last Edit: May 04, 2007, 03:05:28 am by SaWey »
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #171 on: May 04, 2007, 12:58:52 am »

Hey SaWey.. how totally weird!! Your update was something I was going to bug you for but I didnt ask it because I thought it would be too complicated... that is exactly what I wanted.  I will let you know if I have any luck adding stuff to the js.  Thanks again!
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #172 on: May 04, 2007, 01:01:23 am »

erm.. wait.. where did lightbox_q come from?  I just have lightbox_s.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #173 on: May 04, 2007, 01:05:29 am »

Sorry, spelling error, it should be lightbox_s.js, fixed it now.
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #174 on: May 04, 2007, 01:14:46 am »

ok.. i did all the edits but not working for me.  when I close the popup the main page does reload but it stays on the same picture as when i started
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #175 on: May 04, 2007, 01:17:09 am »

hmm, did you click the close button to close the screen or did you hit a key?
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #176 on: May 04, 2007, 01:23:58 am »

button
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #177 on: May 04, 2007, 01:45:56 am »

Can you post the content of the two files?
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: LightBox JS for Fullsize Popup Image
« Reply #178 on: May 04, 2007, 01:56:52 am »

k ... i attached em.  Let me know what i can do to help diagnose this.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: LightBox JS for Fullsize Popup Image
« Reply #179 on: May 04, 2007, 03:04:07 am »

I think I found your problem, you should have looked for the

Code: [Select]
function lightbox_list($picId) {
    global $lang_display_image_php;

$i = 0;
$pid = $picId;
$pic_data = get_pic_data($_GET['album'], $pic_count, $album_name, -1, -1, false);
foreach ($pic_data as $picture) {
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;
}

in the second part of the lightbox update.
and add the code under that:

Code: [Select]
$picture_page = "./displayimage.php?album=".$picture['aid']."&pos=-".$picture['pid'];
PS: don't forget to remove the line you misplaced.
Logged
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 17   Go Up
 

Page created in 0.027 seconds with 21 queries.