Welcome to the automatic photo slideshow script info page - Instructions and download

What is this about?

Screenshot: Script showing images in browser mode
Animation: iframe fading
Screenshot: Listing assistant
Screenshots: Browser mode, fading slides and listing assistant

Features on a glimpse:

The first version of this script went online in 2003, when I wanted to share lots of photos with people I did not see every day. The script is very simple to use - for the user but mostly for you, the administrator. This server-side script simply goes in a web folder with images and works. It first shows a browser overview with automatically generated thumbnails, clicking on a button or one of the pictures starts a slideshow - images are resized to fit the window by default.
A variety of cross-fading / blending modes is included! To the best of my knowledge this is the first free single script solution that fades in and out of images and supports all newer browsers (IE 5.5+, Mozilla Firefox 1+, Opera 6+, Safari...).
You can also offer the user the option to download zip-archives of all photos in browse mode; the archives are created on the fly just like the thumbnails - making photo sharing even more comfortable.
New: The live script configurator lets you try most parameters and generates your personal script - TRY IT
Individual picture texts and links can be read from xml files, which are easily created with the listing assistant.
English, German, Swedish, Dutch, Norwegian, Portuguese, French, Russian, Spanish, Italian and Danish supported; Robert Eriksson, Hans Gradussen, Erik Retvedt, Ligia Moreira, Slavik Fursov, Dieter Zilant, Roberto (fantasyl) and Jens Knudsen kindly provided translations.

See an embedded or iframe slideshow example (bottom of this page).
See an example (browse mode, opens in new window).
See an example (slideshow mode, opens in new window).

LAST CHANGES:
2007-05-11, Live script configurator lets you try most parameters and generates individual script with your settings
2007-03-15, Text and links for individual images are now read from xml files. The xml is easy to create with a listing assistant
2007-03-01, script uses the user's preferred language automatically, parameter added to fit images to screen or show them in their original size initially
2007-01-31, further languages added, oldGD bug removed
2006-08-27, design issues (browser table layout and frames) solved
2006-08-31, hide control elements parameter added
2006-09-04, "all photos as one zip archive" option added
2006-10-30, descriptive texts can be displayed along with a photo instead of filename only, see here
If you use the script and want to be informed when a new version becomes available send email to phpshow-subscribe@googlegroups.com; the archive is here.

How to 'install'?

DOWNLOAD
Just save the file phphow.php to your PC. From there you can upload it to your server; place it in the same directory as the pictures. That's it - all functionality in only one script.
On calling the script like "http://MYDOMAIN.com/photos/phpshow.php" it browses all image files in its directory automatically and displays them - initially 15 on one page. Slideshow mode can be started by a single click - either on a button or on a picture.
For individual photo description texts or links add ?lister, e.g. "http://MYDOMAIN.com/photos/phpshow.php?lister"!
CONFIGURATOR
If you want to change some of the default settings, live script configurator lets you try most parameters and generates an individual script with your settings. Should you prefer to make changes to the script yourself: Some more details can be found below in the optional configuration manual and when you open the script file with a text editor you will find loads of comments.
DONATE
If you find the script useful, and especially if you use it commercially, please support the developer with a small donation to my PayPal account - Thank you!

In case this is the first time you want to share photos over the net without having to send them by mail here are some tips you might find useful:
1) The script is written in PHP, so your webspace provider must support it in order for the script to work (If you are unsure put this in a file test.php:
<?php phpinfo(); ?> - this should make the server output it's PHP configuration upon calling). There are a lot of free (usually ad-financed) webspace providers, just search on google for "free webspace php".
2) To get your photos into a web-appropriate size use the batch conversion mode of a graphics program like Irfanview (for Windows) or a script (for Linux) instead of resizing every picture by hand.

FAQ: Configuration and advanced stuff

NOW NEW: The live script configurator lets you try most parameters and generates your personal script! TRY IT!
  1. Troubleshooting - add ?diag after your script when calling it (e.g. phpshow.php?diag) to get some diagnosis for common problems.
  2. Parameters (like 15 pics per page and the times used for blending) can be changed easily, just open the php file with a text editor and have a look at the first few lines. Important parameters are:
       $GD_WORKAROUND="";//set this to "oldGD" or "newGD" to switch off automatic GD version detection
                         //set to "oldGD" if you experience any trouble with the browse mode!
    $browsertitle="Image browser"; $slidetitle= "Slideshow";
    $autoplay= true; //Shall presentation start automatically in slideshow mode? $stopOnMouseOver=false;//Shall playing be interrupted while the mouse is over a photo (slideshow mode)?
    $imgsperline=5; //5 rows $maxperpage=$imgsperline*3; //3 columns
    $thumbQuality=90; //jpeg compression of thumbs (0 worst, 100 best quality but also largest size) $resample=true; //resample images when creating thumbs - set to true if you have //a fast server as quality is a lot better, but takes a bit of processing
    $lang="auto"; //"auto": use preferred language if available or English if we don't have a translation for the preferred language //for one fixed language this can also be set to "English" or "German" or "Swedish" or "Dutch" or "Norwegian" or //"Portuguese" or "French" or "Russian" or "Spanish" or "Italian"
    $basePath="./"; //use "." for browsing current directory //or for example "./photos" to browse subdir photos $preloadForward=4;//how many pictures do you want to preload ahead? $useFading =true; //do you want to blend between images? - Especially if you expect many people with old //PCs to access your page you might want a false here. N.B.: Fading does not work in oldGD mode! $fadeMode =rand(0,3);//0:classic, 1:right-to-left, 2:left-to-right, 3:square fading type $fadeColor =255; //fade to this grey tone [e.g. 255 is #FFFFFF, 0 equals #000000] $fadeSteps =4; //how many shade levels for fadeing $fadeTime =70; //milliseconds for one shade level //(i.e. overall fade time = $fadeSteps*$fadeTime; // overall fade time must not be bigger than 1200!)
    $startFit =true; //shall the slideshow initially fit images to screen or show the actual size $allowZip =true; //set to false if you do not want to make it easy for people to get //your photos or save bandwith
    $aftertext ="<div class=\"smallprint\" align=\"center\"><font size=\"2\">If you are shown on a picture and don't want this let me know and I will remove it.<br/> <i>This page is autogenerated, get the script <a target=\"_blank\" href=\"http://phpshow.panmental.de/\">here</a></i>.</font></div>"; //comes after the rest of the page at the bottom //Some kind of disclaimer is surely useful and I would really //very much appreciate it if you let people where they can //get this script, but it's up to you if and where to do it.
    $wiwiMargin=50; //the space reserved around the currently displayed picture in $wiheiMargin=123; //auto-fit slideshow mode (width/height), might need to be //bigger if you have free webspace with autogenerated advertisments
  3. A simple way to personalize the page design is to create your own stylesheet. When you open the php file one of the first lines is this one:
      $stylesheet="<link rel=\"stylesheet\" type=\"text/css\" href=\"$SCRIPT_NAME?css\">";
    Just change the href address to your file, e.g. href=\"http://panmental.de/browser/phpshow.css\". Note that quotation marks need to be escaped (\"). You might want to start with the original stylesheet and only replace parts - it contains comments and explains e.g. how to hide control elements.

  4. Incorportating the slideshow into your existing web page is no problem as long as you use it as a stand-alone, i.e. if you leave it unchanged and call it as a frame or iframe. Should you however want to add html to the script file and put anything before the <?PHP tag you need to set $GD_WORKAROUND="oldGD"; and $allowZip=false;. These constraints are imposed by html/php as headers can be sent only once; Thus modes which require image or zip headers will no longer work, as the html header gets sent before the script kicks in! (Note that changes within the PHP code, i.e. to the parameters are no problem.)

  5. Do you want to display descriptive texts or even links along with photos? This is easy to do with the listing assistant. After you have the phpshow script on your server call it in your web browser, adding ?lister at the end. So, if the script is at http://panmental.de/photo/slideshow.php enter http://panmental.de/photo/slideshow.php?lister in your browser.
    The listing assistant will display all images from that directory along with text boxes. Simply enter your description or link next to the corresponding photo. When you are done with annotating click the button to download the xml file. Afterwards you only have to upload this xml file to that photo directory on your server.
  6. Actually instead of placing the original script in all photo directories you can put dummy scripts with the following content there (NO html around the php tags, 3. from above applies!):
      <?PHP
      include '../scripts/phpshow.php';
      ?>
    
    Like this you need to save the script itself only in one place while from every directory you only have a pointer to the full script - saves space and allows for simple changing.
    To make the script behave different depending on the directory it is run from you can also overwrite variables in each dummy script, e.g. add to the dummy script:
      <?PHP
      $browsertitle="Travelling in Europe";
      $slidetitle=  "Travelling in Europe - Slideshow";
      $autoplay= false;
      include '../scripts/phpshow.php';
      ?>
    
  7. To run the script as an embedded or iFrame in an exisiting web page as shown here on the right you need to do the following: First get script running as described above, then set the parameter
      $hideControlElements=true;
    - either in the main script or, which might make more sense, in a dummy script only.
    Then add the following line to your existing web page, with all capital letters replaced to fit your needs:

      <iframe src="http://YOURDOMAIN.COM/PHOTOS/SCRIPT.php?newGD&slides&0"
      width="X" height="Y" scrolling="no" allowtransparency="true" name="slideshow" frameborder="0">
      <p>Uh oh, embedded frames are not supported by your browser!</p> </iframe>


    Additionally you might want to add CSS information to the iframe, as
      style="float:right; margin-left:15px; margin-bottom:5px;"
  8. Want to design your own controls for the slideshow module? External iFrame control from within your page is easy to realize!
    Try this to control the iFrame above right: <<  ||  >>
    The html for this in your main page would be
    <a href="javascript:window.slideshow.goDir=0;window.slideshow.doFade();">&lt;&lt;</a>
    <a href="javascript:window.slideshow.stopit(true);">||</a>
    <a href="javascript:window.slideshow.doFade();">&gt;&gt;</a>
    

This is phpshow.panmental.de, a PAD software description file is available.
I do not guarantee the correctness/adequateness of the script or the information given on this side and thus deny any responsibility for your use of it.
Johannes Knabe (jknabe@panmental.de)
My Homepage is http://panmental.de