PHP Slideshow
There are two versions. Both files have the same name! It's up to you
to rename the files or store them in separate folders. Click the
screenshot of the version you want. A description of the PHP script is
below the two screenshots.
Top Navigation
Left Navigation
Description
You put text, picture, and sound files in the same folder with the PHP
script on your server. Or any one or two of those file types. Make sure
all related files have the same base name (like "flower.jpg" and
"flower.txt"). The script will find all related files, sort them, and
display each related group of files as a slide in a presentation.
The "Left Navigation" version creates links to each slide. The link
text matches the file name minus any leading numbers, dashes, and
underscores. The "Top Navigation" version does not create links
for
individual pages. Other than that difference, the scripts are the same.
The PHP presentation script requires PHP 4.1 or newer on the server. It
will work on a Linux or Windows server as long as the base PHP is
installed. No special PHP extensions are used.
The generated web pages use client-side JavaScript, but will still work
with client-side scripting disabled. The generated web pages use CSS,
but they'll will work without it. Automatic advancement between pages
only works on IE with scripting enabled. Otherwise, you have to click
the nav buttons to advance to the next page. For all browsers, if
scripting is enabled, focus moves to the "Next" nav button after the
page loads, so you can use your "Enter" button to go to the next page
and your "Backspace" button to go back.
For maximum visibility, you might want to tell your viewers to press
"F11" (in FireFox and IE, at least) to view the presentation
fullscreen. The presentation does NOT attempt to resize the client
browser.
As written, the script looks for sound files by extension in
this order:
mid, wma, mp3, au, wav
If multiple files (like "flower.wav" and "flower.mp3") exist, the one
on the right in this list will be used. There's no reason why multiple
files should exist, so this really shouldn't be an issue!
As written, the script looks for text files by extension in
this order:
txt
Yes, that's right. Only the txt file extension is checked for plain
text. What else is there?
As written, the script looks for picture files by extension in
this order:
bmp, png, jpg, jpeg, gif, htm
The same rules apply about base name collisions: The extension on the
right of this list will be used.
Yes HTM files are considered as pictures! You'd use an HTM file if you
needed something an ordinary picture and text couldn't handle. This
gets kind of strange.
- If you had a "flower.htm" that needed to show a picture, you
could name the picture "flower.jpg". Because "htm" is further to
the right in the above extension list, the PHP script wouldn't show the
"flower.jpg" file. Your HTM code in the "flower.htm" file would show
the picture.
- If you need to show more than one picture simultaneously in your
HTM file, the second picture (or all of them) referenced by the HTM
file couldn't be in the same folder as the script. Either that or
the second picture would have to use a file extension not in the
picture extension list.
- If you're using an HTM file as a "picture" here, the only things
that will be used are the parts between the <body> and
</body> tags. If you have code or styles in your <head>
section, they won't survive! Put them in your body section if you
really want them.
- If you have a text file and web page (like "flower.htm" and
"flower.txt"), then the text will be appended after the HTM content. It
may sound crazy, but suppose you have a table of data that needs to be
explained. You could either have a GIF screenshot of your data with a
TXT explanation, or you could just replace the GIF file with an HTM
table. The same TXT explanation would be displayed. If you don't like
that, then don't use TXT and HTM files at the same time!