PDA

View Full Version : Photo Album script v2.0



bassman
08-12-2008, 09:37 PM
1) Script Title: Photo Album script v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/photoalbum.htm

3) Describe problem: Is it possible to take out the bottom yellow numbered boxes on the BODY section of the script when there is only 1 set of images?

I know this defeats the purpose, but I'm making several galleries using this script in the same site. Some contain 1 set of images, and some contain 2 or 3. This script works great for the galleries containing several sets of images, but if I have only 1 set, there is a yellow number 1 box under the images that doesn't mean anything. I don't want to take it out on the CSS because then it will change my whole site. If anyone can help, I would appreciate it.

Thanks!

jscheuer1
08-13-2008, 07:35 AM
Add highlighted to the below function from the script:


photogallery.prototype.createNav=function(gdiv, pdiv , ptext){
if(this.pagecount == 0) return;
var instanceOfGallery=this
var navHTML=""
for (var i=0; i<this.pagecount; i++)
navHTML+='<a href="#navigate" rel="'+i+'">'+ptext[1]+(i+1)+'</a> ' //build sequential nav links
pdiv.innerHTML=ptext[0]+' '+navHTML
var navlinks=pdiv.getElementsByTagName("a")
navlinks[0].className="current" //Select first link by default
this.previouspage=navlinks[0] //Set previous clicked on link to current link for future ref
for (var i=0; i<navlinks.length; i++){
navlinks[i].onclick=function(){
instanceOfGallery.previouspage.className="" //"Unhighlight" last link clicked on...
this.className="current" //while "highlighting" currently clicked on flatview link (setting its class name to "selected"
instanceOfGallery.showpage(gdiv, this.getAttribute("rel"))
instanceOfGallery.previouspage=this //Set previous clicked on link to current link for future ref
return false
}
}
}