PDA

View Full Version : (not PHP) Photo Album + Light Box v2



reprobation
09-07-2006, 07:14 AM
1) Script Title: Photo Album + Light Box v2 = Mixed?

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/photoalbum.htm
&
http://www.dynamicdrive.com/dynamicindex4/lightbox2/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!

reprobation
09-07-2006, 07:26 AM
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.


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!

reprobation
09-07-2006, 07:34 AM
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:



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!