Results 1 to 3 of 3

Thread: (not PHP) Photo Album + Light Box v2

  1. #1
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default (not PHP) Photo Album + Light Box v2

    1) Script Title: Photo Album + Light Box v2 = Mixed?

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...photoalbum.htm
    &
    http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:

    I'm basically trying to mix these two, unfortunately my coding abilitys with java are very limited - I've seen other posts (thank god for the search function) where people have mixed using the PHP version of this, with Light Box v2 - however because I can't use PHP on my server - I'd need to use the manually generated array version..

    Anyway, my issue is I can't figure out how to get the rel="lightbox[roadtrip]" attribute to be applied.

    Please help! I'm in desperate need of this!

  2. #2
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Actually, I just figured this out.

    For those of you also wanting to do this, all you need to do is modify the following:

    Change just this function, and install Light Box v2 as usual.
    Code:
    function buildimage(i){
    var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'" rel="lightbox[roadtrip]">' : ""
    tempcontainer+='<img src="'+galleryarray[i][0]+'" border="1" title="'+galleryarray[i][1]+'">'
    tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
    tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
    return tempcontainer
    }
    Thanks anyway!

  3. #3
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hehe, I'm back!

    I found another problem, and also found a fix to it (search function FTW!)

    You also need to add "initLightbox();" To this following section of code as seen here:

    Code:
    function jumptopage(p){
    var startpoint=(p-1)*totalslots
    var y=1;
    for (i=0; i<totalslots; i++){
    document.getElementById("slide"+i).innerHTML=(typeof galleryarray[startpoint+i]!="undefined")? buildimage(startpoint+i) : ""
    }
    while(document.getElementById("navlink"+y)!=null){
    document.getElementById("navlink"+y).className=""
    y++
    }
    document.getElementById("navlink"+p).className="current"
    initLightbox();
    }
    Thanks again guys!

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
  •