Results 1 to 4 of 4

Thread: PHP and multiple Ultimate slideshow on one page

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

    Default PHP and multiple Ultimate slideshow on one page

    1) Script Title:
    Ultimate Fade-in slideshow (v2.1)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...slideshow.htm3)


    3) Describe problem:
    hi i currently have PHP and ultimate slideshow working on my website but i have one gallery on each page...but i want my site on one html page and i want to call up the slideshow with PHP rather then the manual way which i have succesful done.

    going with the normal way to add multiple galleries i have each slideshow have fadeshow1,2 and fadeshow1toggler, fadeshow2toggler...then in the PHP i thought all i would have to do is make a galleryarray1, galleryaray2 but when i test it only generates gallery for the first one...is the PHP file configured correctly or is there more rewriting of ultimate slideshow script needed to make this happen?

    below is what i think i need to do to the PHP file

    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 PHP ultimate slideshow and tabs option works

    i have no coding experience with PHP but i figured out how to make it work...basically follow the instructions on creating a PHP version of ultimate slide show here:
    http://www.dynamicdrive.com/forums/s...ad.php?t=50151

    you can see my website with it in use here
    http://www.engagephotography.biz/

    even though this has greatly reduced my website loading time in relation to using multiple slideshows as the script is given i still would like to find a way to make the page only load the gallery when someone clicks on that tab section, but this will do for now.

    Code:
    <script type="text/javascript" src="index.php"></script>
    
    
    <script type="text/javascript">
    
    var mygallery=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: galleryarray,
    	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" src="wedding.php"></script>
    
    <script type="text/javascript">
    
    var mygallery=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: galleryarray,
    	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>
    
    <script type="text/javascript" src="fashion.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow3", //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: galleryarray,
    	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: "fadeshow3toggler"
    })
    </script>
    
    
    <script type="text/javascript" src="nature.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "natureshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [746, 497], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: galleryarray,
    	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:true, randomize:false},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: "always",
    	togglerid: "nature7toggler"
    })
    </script>
    
    <script type="text/javascript">
    var mysite=new ddtabcontent("navtabs")
    mysite.setpersist(true)
    mysite.setselectedClassTarget("link") //"link" or "linkparent"
    mysite.init()
    </script>
    
    <script type="text/javascript" src="interiors.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow4", //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: galleryarray,
    	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: "fadeshow4toggler"
    })
    </script>
    
    <script type="text/javascript" src="events.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow5", //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: galleryarray,
    	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: "fadeshow5toggler"
    })
    </script>
    
    <script type="text/javascript" src="product.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow6", //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: galleryarray,
    	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: "fadeshow6toggler"
    })
    </script>
    
    <script type="text/javascript" src="engagement.php"></script>
    
    <script type="text/javascript">
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow7", //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: galleryarray,
    	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: "fadeshow7toggler"
    })
    </script>

  3. #3
    Join Date
    Dec 2015
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The following attachment has a PHP code which is working for only two slides.... I want more slides to show up. I am not much familiar with PHP, so can any one please help to sort out?
    Attached Files Attached Files
    • File Type: txt 2.txt (10.7 KB, 247 views)

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    The attached code is part of a Wordpress plugin bundled with the 13Floor theme. Nothing in it would appear to be limiting the slides to 2 (there is a limit of 5). I would say the issue lies more with your Wordpress settings (or the theme itself - it's 5 years old so is may be due for an upgrade?), but as I'm not a Wordpress user I cannot advise further. Try searching in the Wordpress forums for issues relating to the slider in the 13Floor theme. Or try contacting the developers of the theme directly https://www.elegantthemes.com/blog/t...-theme-13floor . Unfortunately the issue does not appear to be with the script from DD as it is working correctly, so you should approach the Wordpress community for troubleshooting assistance relating to setup.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

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
  •