1) Script Title:
Tab Content Script (v 2.2)
Ultimate Fade-in slideshow (v2.1)
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...tabcontent.htm
http://www.dynamicdrive.com/dynamici...slideshow.htm3)
Describe problem:
i currently have Ultimate Fade-in slideshow (v2.1) working with PHP for multiple web pages. However i just found this tab script and want to put all my web galleries on one html page but am having a problem getting the slideshow to generate the multiple galleries
heres link to test page. i tried setting up the html file to render headshot and wedding galleries. only the headshot one is displaying images...in all i will need 7 different galleries.
http://www.engagedesign.com/index2.html
i tried adding fadeshow1, fadeshow2, fadeshow1toggler, fadeshow2toggler assuming it would want different names for each gallery.
i created an index2.php and copied my other php gallery codes into this one php code in hopes it would generate them all but it didnt..im not a coder so im sure its more complicated then that.Code:<script type="text/javascript" src="index2.php"></script> <script type="text/javascript"> var mygallery1=new fadeSlideShow({ wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow dimensions: [461, 377], //width/height of gallery in pixels. Should reflect dimensions of largest image imagearray: galleryarray1, displaymode: {type:'manual', pause:2500, cycles:0, wraparound:true}, persist: false, //remember last viewed slide and recall within same session? fadeduration: 500, //transition duration (milliseconds) descreveal: "always", togglerid: "fadeshow1toggler" }) </script> <script type="text/javascript"> var mygallery2=new fadeSlideShow({ wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow dimensions: [461, 377], //width/height of gallery in pixels. Should reflect dimensions of largest image imagearray: galleryarray2, displaymode: {type:'manual', pause:2500, cycles:0, wraparound:true}, persist: false, //remember last viewed slide and recall within same session? fadeduration: 500, //transition duration (milliseconds) descreveal: "always", togglerid: "fadeshow2toggler" }) </script>
Code:<?php Header("content-type: application/x-javascript"); function returnimages($dirname="./images/headshots/") { $pattern="\.(jpg|jpeg|png|gif|bmp)$"; $files = array(); $curimage=0; if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ echo 'galleryarray1[' . $curimage .']=["' . $dirname . $file . '"];' . "\n"; $curimage++; } } closedir($handle); } return($files); } echo "var galleryarray1=new Array();" . "\n"; returnimages(); function returnimages($dirname="./images/weddings/") { $pattern="\.(jpg|jpeg|png|gif|bmp)$"; $files = array(); $curimage=0; if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ echo 'galleryarray2[' . $curimage .']=["' . $dirname . $file . '"];' . "\n"; $curimage++; } } closedir($handle); } return($files); } echo "var galleryarray2=new Array();" . "\n"; returnimages(); ?>



Reply With Quote
Bookmarks