Advanced Search

Results 1 to 4 of 4

Thread: [DHTML] Lightbox 2.04a - First Light Link Edition for Dynamic Drive

  1. #1
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,700
    Thanks
    42
    Thanked 2,909 Times in 2,881 Posts
    Blog Entries
    12

    Default [DHTML] Lightbox 2.04a - First Light Link Edition for Dynamic Drive

    1) CODE TITLE: Lightbox 2.04a - First Light Link Edition for Dynamic Drive

    2) AUTHOR NAME/NOTES: Lokesh Dhakar - modifications for Dynamic Drive by jscheuer1

    3) DESCRIPTION: This is the latest version of Lokesh Dhakar's Lightbox script with modifications to allow for linked captions and a 'first light' feature. The caption link may be targeted and the first light allows for an optional choice of image link to load into the lightbox on page load (once per session or always). Optional Lightbox start and end callback functions that can be configured globally in the script, or per page (on each page) using the script. The modified code also takes care of two bugs in Lokesh Dhakar's version:

    • Missing captions would be filled in with the most recently used caption.
    • The Array.prototype.uniq used for removing duplicate images did not work with Lightbox's multidimensional arrays.


    Only the demo page and lightbox.js script have been changed from the official v2.04 release on Lokesh Dhakar's website, which already has several improvements over v2.03/v203a.

    4) URL TO CODE: http://home.comcast.net/~jscheuer1/side/lightbox2.04a/


    Note: At this writing, the rest of the Lightbox v2.04 release files can be gotten here:

    http://www.lokeshdhakar.com/projects...ghtbox2.04.zip

    Remember to use my updated version of the main script:

    http://home.comcast.net/~jscheuer1/s...js/lightbox.js

    Full 2.04a release:

    http://home.comcast.net/~jscheuer1/s...htbox2.04a.zip
    Last edited by jscheuer1; 10-28-2009 at 04:29 PM. Reason: add new feature
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  2. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Rooffy (11-13-2008)

  3. #2
    Join Date
    Jan 2008
    Posts
    4,103
    Thanks
    18
    Thanked 615 Times in 611 Posts
    Blog Entries
    5

    Default

    Nice, that fixes some people saying "Whats wrong with this script. "

  4. #3
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How do I set this to load only once?

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,700
    Thanks
    42
    Thanked 2,909 Times in 2,881 Posts
    Blog Entries
    12

    Default

    If you mean once per browser session, simply set cookieForFirstLight to true as shown here in the Configuration section of the lightbox.js file for this version (starts around line #47):

    Code:
    // -----------------------------------------------------------------------------------
    
    LightboxOptions = Object.extend({
    //
    //  Configuration
    //
        fileLoadingImage:        'images/loading.gif',     
        fileBottomNavCloseImage: 'images/closelabel.gif',
        cookieForFirstLight:     true,  // use session only cookie for first light?  (true/false)
    
        overlayOpacity: 0.8,   // controls transparency of shadow overlay
    
        animate: true,         // toggles resizing animations
        resizeSpeed: 7,        // controls the speed of the image resizing animations (1=slowest and 10=fastest)
    
        borderSize: 10,        // if you adjust the padding in the CSS, you will need to update this variable
        
        forceLocal: false,     // set to true to force lightbox into a frame or iframe 
                               // (default: false) - will allow lighbox effect to appear on the top page of an iframe if any
    
        startCallback: function(){}, // callback for ligthbox start
        startCallbackType: 'afterFinish', // scriptaculous effect callback method default = 'afterFinish'
    
        endCallback: function(){}, // callback for lightbox end
        endCallbackType: 'afterFinish', // scriptaculous effect callback method default = 'afterFinish'
    
    	// When grouping images this is used to write: Image # of #.
    	// Change it for non-english localization
    	labelImage: "Image",
    	labelOf: "of"
    
    // End Configuration -----------------------------------------------------------------------------------
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •