The code is in a slideshow page in the root directory. The code as I have it on the page:
Code:
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="fadeslideshow.js">
/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript" src="slidepics.php"></script>
<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "picshow",
dimensions: [500, 500],
imagearray: galleryarray(),
sortby: ["file", "asc"],
displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
persist: false,
fadeduration: 200,
descreveal: "always",
togglerid: "picshowtoggler"
})
</script>
It's called in the HTML like so:
HTML Code:
<div id="picshowtoggler" style="width: 900px; margin: 0">
<a href="#" class="prev" style="height: 50px; float: left; border: 0; margin: 220px 0 0 60px"><img src="altprev.png" style="border: 0" alt="Previous"/></a>
<a href="#" class="next" style="height: 50px; float: right; border: 0; margin: 220px 60px 0 0"><img src="altnext.png" style="border: 0" alt="Next" /></a>
<div id="slideshowtoggler">
<a href="#" class="prev" style="height: 50px; float: left; border: 0; margin: 220px 0 0 60px"></a>
<a href="#" class="next" style="height: 50px; float: right; border: 0; margin: 220px 60px 0 0"></a>
<div id="picshow"></div><br />
And as you can see, it calls a separate PHP file called "slidepics" (also in the root directory), which looks like this:
PHP Code:
<?php
Header("content-type: application/x-javascript");
function returnimages($dirname="./images/Slides/") {
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
echo 'galleryarray[' . $curimage .']=["' . $dirname . $file . '"];' . "\n";
$curimage++;
}
}
closedir($handle);
}
return($files);
}
echo "var galleryarray=new Array();" . "\n";
returnimages();
?>
It calls all the images in the "Slides" folder of the "images" directory. Not sure if any of this is helpful, but if possible, a good tweaking would be best.
Bookmarks