Results 1 to 2 of 2

Thread: Photo Album script v2.0

  1. #1
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Photo Album script v2.0

    1) Script Title: Photo Album script v2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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!

  2. #2
    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

    Add highlighted to the below function from the script:

    Code:
    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
    		}
    	}
    }
    - 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
  •