Friday 25 June 2010

Automatically load images from a folder


A popular request for Magic Slideshow is to automatically fetch images from a folder.

You can do this in a variety of ways, depending upon the applications available on your web server. Many of our customers use PHP, so we have prepared advice to fetch images using PHP.
  1. Download this file: magicslideshow.php
  2. Upload that file to your website.
  3. Add the following code to your HTML page/template where you want your slideshow to appear.
    <php
    include('/path/to/magicslideshow.php');
    MagicSlideshow('/path/to/image/folder', 'http://example.com/path/to/image/folder');
    ?>
    

  4. Change the code to the full path of the folder where you uploaded the magicslideshow.php file.

For Smarty templates, you should use '{php}' and '{/php}' instead of <php and ?>.

Please contact us if you would like further help.

Magic Slideshow is our JavaScript image carousel that slides or fades one image to another. It uses JavaScript, CSS and clean semantic HTML to provide a smooth looking effect with text descriptions, thumbnails and arrows for navigation. Try out these examples.

No comments:

Post a Comment