My way, or your way
The way I use it is to have the script on a web server that I have ssh access to, and use cron to schedule the script to run once per day, although this might be increased to two times per day if I find I have a lot of images to show. The idea is that once I'm happy with an image and want to show it off, I create an appropriately sized JPEG, and place it into the designated directory on the machine hosting the script. When the script runs it will choose one image file at random and regenerates all of the pages, indices and RSS feed.You can, of course, run the script on a machine that is not directly connected to the Internet, and copy the resulting files over to your webspace. This method would work well for the free non-scriptable space provided free by most ISP's, but the drawback is that you will need to ensure the files are copied over.
Requirements
You have to have a *nix machine (Linux, *BSD, OS X, etc.) and will need to make sure that your version of PHP has theexif
and
pcre
modules compiled into it (check with
php -m
) and that you have
ImageMagick
and jpegoptim
available
in your default path.
Note that to get text to appear beneath the image you will need to embed an IPTC Caption tag.
Depending upon the state of your
php.ini
file,
you may have to add the line:
allow_call_time_pass_reference = On
in order to allow the
exec()
call to correctly
return a file list. This wasn't an issue on the default OS X
10.4.9 version of PHP, but it was for a NetBSD ports build
variant.
Included files
The download tarball does include programs that I didn't write - look at the components page for more information on each of those parts.Known Limitations
- The tooltips have a solid colour background in Safari. Firefox correctly renders the background as translucent.
- Internet Explorer has not been tested at all (if it works, then great, but have you not considered switching to something more standards compliant ?)
- The HTML generated has a terrible lack of indentation by design, to help keep file sizes down
- The default themes don't work too well with images larger than 600x450
- Comments are only extracted from the IPTC Caption tag
- Aperture generates bad EXIF data according to PHP's EXIF parser, and each run will generate many non-fatal errors
- All
index.html
files are rebuilt every time the software is run, which is inefficient for very large sites - this will be addressed in the near future - The RSS2 image feed has no formatting, which makes it a little dull
License
This software is BSD licensed.This software uses the CSS files and navigation images from Birch, which is BSD licensed (see
README.birch
for full details); wz_tooltip which appears to be freely
useable (with a donation request) and FeedCreator.class.php
is LGPL. The original unmodified wz_tooltip and FeedCreator
files are included in the download, in the
contrib
directory.