Results 1 to 7 of 7

Thread: Lightbox image viewer 2.03 + Photo Album script v2.0

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox image viewer 2.03 + Photo Album script v2.0

    Lightbox image viewer 2.03
    http://www.dynamicdrive.com/dynamici...box2/index.htm

    Photo Album script v2.0
    http://www.dynamicdrive.com/dynamici...photoalbum.htm

    Hi, i am trying to combine Lightbox image viewer 2.03 and Photo Album script v2.0. my aim is to make it so that when a thumbnail in the photo album script is selected it then prompts the larger image to appear through the lightbox image viewer script.

    i have already seen another post similar to this one but instead the person was asking about PHP Photo Album script and i found the solution was not the same, in any case im really new at this stuff so any help will be nice, thanks.

  2. #2
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    i don't have a solution, but i just wanted other readers to know i would very much like to see one!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Install the lightbox scripts and styles in the head of the page as instructed, and install the Photo Album script with these modifications -

    Get rid of these two lines from the Photo Album's external script:

    Code:
    gdiv.onselectphoto=function(imgobj, linkobj){return true} //custom event handler "onselectphoto", invoked when user clicks on an image within gallery
    Code:
    gdiv.onclick=function(e){return photogallery.defaultselectaction(e, this)} //attach default custom event handler action to "onclick" event
    Change this line:

    Code:
    imageHTML='<a href="'+imgparts[2]+'" target="'+linktarget+'">'+imageHTML+'</a>'
    to:

    Code:
    imageHTML='<a href="'+imgparts[2]+'"  title="'+imgparts[1]+'" rel="lightbox" onclick="myLightbox.start(this); return false;">'+imageHTML+'</a>'
    Get rid of this stuff:

    Code:
    //OPTIONAL: Run custom code when an image is clicked on, via "onselectphoto"
    //DELETE everything below to disable
    //Syntax: function(img, link){}, whereby img points to the image object of the image, and link, its link object, if defined
    thepics.onselectphoto=function(img, link){
    if (link!=null) //if this image is hyperlinked
    window.open(link.href, "", "width=800, height=600, status=1, resizable=1")
    return false //cancel default action when clicking on image, by returning false instead of true
    }
    Make sure to use at least the 1st (thumbnail) and last (larger image) entries for each of the image array items:

    Code:
    myvacation[0]=["../photo1.jpg", "", "photo1-large.jpg"]
    Last edited by jscheuer1; 09-11-2007 at 05:33 AM.
    - John
    ________________________

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

  4. #4
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default a little bit more...

    hi. thanks for the modification. on galleries with multiple "pages", this mod doesn't seem to work after Page 1. e.g., the lightbox effect works on Page 1, but not Pages 2, 3, 4 etc.


    Quote Originally Posted by jscheuer1 View Post
    Install the lightbox scripts and styles in the head of the page as instructed, and install the Photo Album script with these modifications -

    Get rid of these two lines from the Photo Album's external script:

    Code:
    gdiv.onselectphoto=function(imgobj, linkobj){return true} //custom event handler "onselectphoto", invoked when user clicks on an image within gallery
    Code:
    gdiv.onclick=function(e){return photogallery.defaultselectaction(e, this)} //attach default custom event handler action to "onclick" event
    Change this line:

    Code:
    imageHTML='<a href="'+imgparts[2]+'" target="'+linktarget+'">'+imageHTML+'</a>'
    to:

    Code:
    imageHTML='<a href="'+imgparts[2]+'"  title="'+imgparts[1]+'" rel="lightbox" onclick="myLightbox.start(this); return false;">'+imageHTML+'</a>'
    Last edited by radiofriendlybox; 09-11-2007 at 11:23 PM. Reason: format change

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Works here, on three 'pages'.

    Make sure that you are using the latest versions of both scripts (the latest versions available on Dynamic Drive - those are the ones I used), and that you have followed all of the instructions from my post exactly.

    If you need more help:

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    Last edited by jscheuer1; 09-12-2007 at 03:01 AM.
    - John
    ________________________

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

  6. #6
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    crikey! duh, i was using the first version of this script: http://www.dynamicdrive.com/dynamici...tbox/index.htm

    sorry for being a dunce. what would the mod for this one be? works fine on the first "page", but not thereafter. more specifically, the script stops working correctly after you click on new "page".

    you can see what i'm doing here: http://www.32-bits.com/dd_temp

    (you can type in http://www.32-bits.com/dd_temp/js or /css to see the script/stylesheet.)

    thanks!

    Quote Originally Posted by jscheuer1 View Post
    Works here, on three 'pages'.

    Make sure that you are using the latest versions of both scripts (the latest versions available on Dynamic Drive - those are the ones I used), and that you have followed all of the instructions from my post exactly.

    If you need more help:

    Please post a link to the page on your site that contains the problematic script so we can check it out.

  7. #7
    Join Date
    Jan 2008
    Location
    RJ, Brasil
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I want to do the same, but something is wrong.
    I'm using the latest version of the lightbox.
    But my doubt is how to mix the
    myvacation[0]=["1896/001t.jpg", "Foto 1", "1896/001.jpg"] ==> Photo Album
    and
    <a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a> ==> Lightbox.

    Here is a link to my page:
    [broken link that now goes to adult content removed]

    Thanks!!!
    Last edited by jscheuer1; 01-10-2008 at 03:32 AM.

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
  •