Welcome to the automatic photo slideshow script info page - Instructions and download
What is this about?
Screenshots: Browser mode, fading slides and listing assistant
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.
Features on a glimpse:
- zero configuration setup for instant results
- instant thumbnail images
- individual image texts and links as well as page titles possible (in xml format, easy with listing assistant)
- automatically builds dynamic slideshow from images in current directory
- can blend or cross-fade between photos with different effects
- preloading of images to increase performance for viewer
- on-the-fly zip archives of pictures (no waste of space)
- timed and manual rotation
- modular box mode (control elements hidden, auto-slideshow in an iframe)
- random display order option
- 10 languages supported (auto-detects user's preferred language)
- supports png, jpg / jpeg, and gif image formats
- one file solution
- only server with PHP required, no mySQL, flash or similar needed
- it's all free
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).
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 firstname.lastname@example.org; the archive is here.
How to 'install'?
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"!
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.
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!
- Troubleshooting - add
?diag after your script when calling it (e.g.
phpshow.php?diag) to get some diagnosis for common problems.
- 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!
$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
- 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.
- 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
$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.)
- 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?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.
- 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!):
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:
$browsertitle="Travelling in Europe";
$slidetitle= "Travelling in Europe - Slideshow";
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
- 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:
width="X" height="Y" scrolling="no" allowtransparency="true" name="slideshow" frameborder="0">
<p>Uh oh, embedded frames are not supported by your browser!</p>
Additionally you might want to add CSS information to the iframe, as
style="float:right; margin-left:15px; margin-bottom:5px;"
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
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 (email@example.com)
My Homepage is http://panmental.de