Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on Coppermine Photo Gallery Users - Get rid of those butt fugly CPG popups in the Open Discussion & Chit-chat forum
Dude! I've been messing with CPG for over 3 years - and finally got rid of the $%&# popup box!!! Check it out (click to ...

  1. #1
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775

    Exclamation Coppermine Photo Gallery Users - Get rid of those butt fugly CPG popups

    Dude!

    I've been messing with CPG for over 3 years - and finally got rid of the $%&# popup box!!!

    Check it out (click to view full size pic): http://www.lenon.com/modules.php?nam...ed&cat=0&pos=2

    Here's what I used: http://www.huddletogether.com/projects/lightbox/

    Man, I am sooooo happy to get rid of that stupid popup!!!

    EDIT

    Actually, I used Lightbox2: http://www.huddletogether.com/projects/lightbox2/
    Last edited by Vin DSL; 09-03-2007 at 08:42 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  2. #2
    Darth Admin (aka Jag) JPC-Greg's Avatar
    Join Date
    Sep 1998
    Posts
    5,201
    Making use of the newly added smilies I see
    Greg L. | Chief Executive Officer
    JaguarPC.com

    Helpful Links
    Knowledge Base | Network Status

    Need a Manager?
    (pm) | (email) David, Customer Service Manager
    (pm) | (email) Zach, Community Liason, Sales manager
    (pm) | (email) Masood, Chief Technical Officer
    (pm) | (email) Les, Chief Operations Officer

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Yep! I like change...

    Nice addition[s]!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Here's a cute hack (lightbox.js)...

    Resizes the containers & images so they are no bigger than the current browser window:

    Code:
         //
         //     changeImage()
         //     Hide most elements and preload image in preparation for resizing image container.
         //
         changeImage: function(imageNum) {     
              
              activeImage = imageNum;     // update global var
    
              // hide elements during transition
              if(animate){ Element.show('loading');}
              Element.hide('lightboxImage');
              Element.hide('hoverNav');
              Element.hide('prevLink');
              Element.hide('nextLink');
              Element.hide('imageDataContainer');
              Element.hide('numberDisplay');          
              
              imgPreloader = new Image();
              
              // once image is preloaded, resize image container and
              // the image so it's no bigger than the current window
              imgPreloader.onload=function(){
                   Element.setSrc('lightboxImage', imageArray[activeImage][0]);
                   // start hack
                   if (imgPreloader.height > 600){
                   imgPreloader.width = parseInt((600/imgPreloader.height) * imgPreloader.width)
                   imgPreloader.height = 600
                   }else if(
                   imgPreloader.width > 600){
                   imgPreloader.height = parseInt((600/imgPreloader.width) * imgPreloader.height)
                   imgPreloader.width = 600}
                   // end hack
                   Element.setWidth( 'lightboxImage', imgPreloader.width - (borderSize * 2));
                   Element.setHeight( 'lightboxImage', imgPreloader.height - (borderSize * 2));
                   myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
                   imgPreloader.onload=function(){};     //     clear onLoad, IE behaves irratically with animated gifs otherwise
              }
              imgPreloader.src = imageArray[activeImage][0];
         },
    Example: http://www.lenon.com/modules.php?nam...album=7&pos=39

    This was a monster!
    Last edited by Vin DSL; 09-04-2007 at 11:03 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Actually, I think this works better...

    Code:
         //
         //     changeImage()
         //     Hide most elements and preload image in preparation for resizing image container.
         //
         changeImage: function(imageNum) {     
              
              activeImage = imageNum;     // update global var
    
              // hide elements during transition
              if(animate){ Element.show('loading');}
              Element.hide('lightboxImage');
              Element.hide('hoverNav');
              Element.hide('prevLink');
              Element.hide('nextLink');
              Element.hide('imageDataContainer');
              Element.hide('numberDisplay');          
              
              imgPreloader = new Image();
              
              // once image is preloaded, resize image container and
              // the image so it's no bigger than the current window
              imgPreloader.onload=function(){
                   Element.setSrc('lightboxImage', imageArray[activeImage][0]);
                   // start hack
                   if (imgPreloader.height > 600){
                   imgPreloader.width = parseInt((600/imgPreloader.height) * imgPreloader.width)
                   imgPreloader.height = 600
                   }else if(
                   imgPreloader.width > 800){
                   imgPreloader.height = parseInt((800/imgPreloader.width) * imgPreloader.height)
                   imgPreloader.width = 800}
                   // end hack
                   Element.setWidth( 'lightboxImage', imgPreloader.width - (borderSize * 2));
                   Element.setHeight( 'lightboxImage', imgPreloader.height - (borderSize * 2));
                   myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
                   imgPreloader.onload=function(){};     //     clear onLoad, IE behaves irratically with animated gifs otherwise
              }
              imgPreloader.src = imageArray[activeImage][0];
         },
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  6. #6
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Very nice look, Vin.
    Good luck

  7. #7
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by Ron View Post
    Very nice look, Vin.
    Thanks!

    That CPG box has been bugging me for years!

    Heh!

    If they weren't so pissed off at me for running v1.1D, maybe CPG would invite me to be on their dev team again...

    Some broad over there threatened to sue me a while back, so I don't think that's gonna happen, you know?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •