Results 1 to 3 of 3

Thread: Two Simple Gallery Queries

  1. #1
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two Simple Gallery Queries

    1) Script Title: SimpleGallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...plegallery.htm

    3) Describe problem:

    Thanks to John Scheuer's amazing attention to this forum (and his superb solutions), I have added a background color to simplegallery in a site on which I'm working. It works in IE, FF, Chrome, and Safari. I also switched to simplegallery_iefix.js. However, in IE—an instant before simplegallery loads—I briefly see the word "null" appear, which wrecks the effect. First question: can that be resolved?

    Second question: How does one delete the 1/x number of slides slug at the bottom of the slide show?

    The site-under-construction is www.betsylittle.com

    Many thanks in advance for any help, Christopher

  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

    Second question first. Put this stylesheet in the head of the page:

    Code:
    <style type="text/css">
    .gallerystatus {
    	display: none !important;
    }
    Or incorporate its rule into an existing stylesheet for the page.

    First question - Replace the showslide function in simplegallery_iefix.js with this one:

    Code:
    		showslide:function(keyword){
    			var slideshow=this
    			var setting=slideshow.setting
    			var totalimages=setting.imagearray.length
    			var imgindex=(keyword=="next")? (setting.curimage<totalimages-1? setting.curimage+1 : 0)
    				: (keyword=="prev")? (setting.curimage>0? setting.curimage-1 : totalimages-1)
    				: Math.min(keyword, totalimages-1)
    			setting.gallerylayers[setting.bglayer].innerHTML=simpleGallery.routines.getSlideHTML(setting.imagearray[imgindex])
    			setting.$gallerylayers.eq(setting.bglayer).css({zIndex:1000, opacity:0}) //background layer becomes foreground
    				.stop().css({opacity:0}).animate({opacity:1}, setting.fadeduration, function(){ //Callback function after fade animation is complete:
    					clearTimeout(setting.playtimer)
    					setting.gallerylayers[setting.bglayer].innerHTML='';  //empty bglayer (previously fglayer before setting.fglayer=setting.bglayer was set below)
    					try{
    						setting.onslide.call(slideshow, setting.gallerylayers[setting.fglayer], setting.curimage)
    					}catch(e){
    						alert("Simple Controls Gallery: An error has occured somwhere in your code attached to the \"onslide\" event: "+e)
    					}
    					setting.currentstep+=1
    					if (setting.autoplay[0]){
    						if (setting.currentstep<=setting.totalsteps)
    							setting.playtimer=setTimeout(function(){slideshow.showslide('next')}, setting.autoplay[1])
    						else
    							slideshow.navigate("play/pause")
    					}
    				}) //end callback function
    			setting.gallerylayers[setting.fglayer].style.zIndex=999 //foreground layer becomes background
    			setting.fglayer=setting.bglayer
    			setting.bglayer=(setting.bglayer==0)? 1 : 0
    			setting.curimage=imgindex
    			setting.navbuttons[3].innerHTML=(setting.curimage+1) + '/' + setting.imagearray.length
    			if (setting.imagearray[imgindex][3]){ //if this slide contains a description
    				setting.$descpanel.css({visibility:'visible'})
    				setting.descdiv.innerHTML=setting.imagearray[imgindex][3]
    			}
    			else if (setting.longestdesc!=""){ //if at least one slide contains a description (feature is enabled)
    				setting.descdiv.innerHTML='';
    				setting.$descpanel.css({visibility:'hidden'})
    	
    			}
    		},
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You're a one-man service industry! Thanks. Both worked, of course. Best, Christopher

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
  •