Results 1 to 2 of 2

Thread: PHP help with Tab Content Script (v 2.2) and Ultimate Fade-in slideshow (v2.1)

  1. #1
    Join Date
    Sep 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP help with Tab Content Script (v 2.2) and Ultimate Fade-in slideshow (v2.1)

    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.

    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>
    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:
    <?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(); 
    ?>

  2. #2
    Join Date
    Sep 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS for tab menus

    on a second note, i am using my own css to control the look of the nav, for some reason the text size is incorrect by default, then when you click text the correct size is displayed...i havent touched my CSS and the nav CSS are all coded to be 7pt?

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
  •