Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #276

In Slide Show Magic (SSM) can the 1st image in a Panel Section be displayed automatically when the section panel is opened?

The Answer

Prepared Dec. 2009 by Gerry Jacobsen, PVII

You can set the Slide Show Magic (SSM) system to automatically show the first image in the thumbnail panel section whenever that panel section is opened by applying this code tweak:

1. Open the p7SSMscripts.js file, scroll to the bottom of the page, create a new line and copy and paste this new script function into that new line:

function P7_SSMshowFirstImage(a,bp){
  var tT,tA,c;
  c=(bp==1)?null:1;
  tT=document.getElementById(a.id.replace("tp","wp"));
  if(tT){
     tA=tT.getElementsByTagName("a");
     if(tA&&tA[0]){
        P7_SSMtmb(tA[0],c);
     }
  }
}

2. Locate the end of the P7_SSMopenPanel(iD,c) function, around line 850:

      if(a.p7type=='toggle'){
         if(P7ssma[2]==1){ 
            P7_SSMtoggle(iD,c); 
         }
      }
     }
    }
  }
 }

3. Locate the 5th } from the bottom, and add a new line beneath it, copy and paste this into the new line:

      P7_SSMshowFirstImage(a,c);

so that it now looks like this:

      if(a.p7type=='toggle'){
         if(P7ssma[2]==1){ 
            P7_SSMtoggle(iD,c); 
         }
      }
      P7_SSMshowFirstImage(a,c);
     }
    }
  }
 }

4. Save the file.

That's it, the 1st image in the section will now always display whenever the section panel is opened. Closing and toggling of other panels is preserved to normal behavior.

Back to the questions list