Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: Creating Slide Show

  1. #1
    Senior Member jannmirch's Avatar
    Join Date
    Sep 2005
    Posts
    229

    Creating Slide Show

    I have a client who would like to have a slide show on the home page.

    The trick is she would like it set up so that new images can be dropped into a directory on the server and automatically be included in the slide show. Likewise, she would like old images to be able to be excluded from the slide show by simply removing them.

    I was working with a programmer who told me it would be "no problem" to set up, but when he realized that I didn't want to have to manual edit the javascript every time I added/removed a picture, he disappeared.

    I have almost no programming experience, though I have tinkered a bit with javascript. It seems like it should be doable with some sort of CMS. But I'm at a loss.

    Can anyone advise me on a) whether this is possible and b) if so, the best way to proceed?

    Thanks in advance!
    Marketing & Web Design www.WestchesterMarketingCafe.com
    Twitter: @JannMirch
    FB: Marketing Cafe

  2. #2
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138

    Re: Creating Slide Show

    It is possible. Most likely you would do the scripting with Javascript to control changing the images. The tricky part comes in from scanning the folder where you store the images. This would be done either with PHP or Perl, whichever you use on your server. Basically, the PHP code would give the javascript the names of all the images in the folder so the javascript can cycle through.

    Here is the PHP code to read the names of all the files in a directory.
    PHP Code:
    <?PHP 
    // Define the full path to your folder from root   
    $path "/www/folder/path/img/";   
    // Open the folder   
    $dir_handle = @opendir($path) or die("Cannot open the file $path");   
    // Loop through the files   
    while ($file readdir($dir_handle)) {   
       
    $filepath 'your.url/path/'.$file;
       echo 
    $filepath;
    }
    // Close   
    closedir($dir_handle);                       
    ?>
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  3. #3
    WebProWorld MVP DaveSawers's Avatar
    Join Date
    Dec 2006
    Location
    Lunenburg, Nova Scotia, Canada
    Posts
    760

    Re: Creating Slide Show

    And then you need to use PHP to write the file list into the Javascript code that actually cycles through those images for display purposes.

    And you need to consider what to do if the user has Javascript turned off.
    Dynamic Software Development
    www.activeminds.ca

  4. #4
    Junior Member cPages's Avatar
    Join Date
    Aug 2007
    Posts
    2

    Re: Creating Slide Show

    Hello,

    We suggest using a flash slide show. Once the slide show template is made it would be simply a matter of uploading your re-sized image to the server and editing an xml file on the server to change the images and descriptions.

    Let us know if you need any help,

    Regards

Similar Threads

  1. Javascript slide show not working
    By PARoss in forum Web Programming Discussion Forum
    Replies: 1
    Last Post: 04-05-2007, 07:27 PM
  2. PR 5 - flash slide show and photo slide show related
    By lookaa in forum Link Exchange
    Replies: 2
    Last Post: 03-22-2006, 07:16 AM
  3. JavaScript Image Slide Show
    By WWWDesignWizard in forum Graphics & Design Discussion Forum
    Replies: 13
    Last Post: 01-21-2006, 02:07 PM
  4. Please review www.flash-slide-show.com, thanks
    By picaso in forum Submit Your Site For Review
    Replies: 1
    Last Post: 10-17-2005, 06:59 AM
  5. www.flash-slide-show.com
    By lux in forum Submit Your Site For Review
    Replies: 3
    Last Post: 09-30-2005, 07:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •