                        Some Photo Album
             by Chris Petersen <php@forevermore.net>

DESCRIPTION:

This PHP script generates thumbnails for all images in a directory.  It
handles any file format supported by ImageMagick, and may someday also
handle MPEG files if I can ever get dumpmpeg to work without X.

For more info on the tools being used to export mpeg sequences, see:
	mpgtx	 <http://mpgtx.sourceforge.net>
	dumpmpeg <http://sourceforge.net/projects/dumpmpeg/>
	SDL	     <http://www.libsdl.org/>
	SMPEG    <http://www.lokigames.com/development/smpeg.php3>

INSTALLATION:

To install, just unzip in your desired album directory, and edit the
html-like file "header.php" in the "includes" directory to fit your
interface desires.  Any images you would like to include in your album
should go in the "images" directory, which MUST be writable by the
webserver (this is where it stores the thumbnails, too).

If you wish to give names and descriptions to your images, all you have
to do is create a matching .txt file in the same directory as the
image.  Thus, if you have a "picture.jpg" all you have to do is create
a "picture.txt".  The first line of the file will be interpreted as the
name of the image, and everything after that will be used as the
description.  If you have questions, please see one of the included
examples.

LICENSE:

This software is provided free of charge, WITHOUT a warranty.  This
means that you are to use this AT YOUR OWN RISK (ie. it's your fault
if something goes wrong with this script and you accidentally screw
something up with your machine, or delete your hard drive, etc).

For noncommercial use (ie. you don't in ANY WAY make money off of it),
this software is distributed under the GNU General Public License, as
found at <http://www.gnu.org/licenses/gpl.html>.  If you wish to make
money off of a gallery that uses this script, please contact me for
other licensing options.

The sample images included with this script are intended to be used
only as configuration examples.  They are copyrighted to Chris Petersen
and are not to be used on a live gallery without written permission.

HISTORY:

I went looking for a good gallery program written in php.  There are
many of these, but it seemed that they were either WAY more than I
wanted, or didn't do enough.  DirectoryMediaIndex (by Tony J. White
<tjw@tjw.org>) struck me as the best option - even if I couldn't get
the mpeg thumbnails working properly - but lacked certain features like
multiple pages, etc.  So, I took Tony's idea and pretty much rewrote it
from scratch, adding features I'd seen in other gallery programs and
thought would be useful.

I may add more features someday (I'd like to get the mpeg thumbnail
stuff working properly), but for now it's done (I really just wanted a
simple drop-in gallery script, and it's already grown beyond that).

ADVANCED INSTRUCTIONS:

If you know a little php, or aren't scared to poke around a bit, I've
tried to make this script as modular as possible.  All of the main
configuration options are stored in conf.php, and should be pretty well
documented.  What follows is a description of the files in the
"includes" directory.

gallery.css

  This is a nonessential style sheets file.  I put it into the includes
  directory to keep the main script directory a little cleaner.

header.php, footer.php

  These files are the wrapper files for what index.php displays.  You
  can pretty much control the look of an entire web page with only
  these two files.

pages.php

  This file comes immediately after header.php, and immediately before
  footer.php.  The code should be fairly easy to understand, or at least
  modify to change the next/previous and page links.

rowseparator.php

  This page dictates how the end of each row of thumbnails will look.
  For the most part, it should just be the end of a table row and
  beginning of another (default), or as simple as a <BR> tag.  You are,
  of course, welcome to make it a complicated as you like.

thumbnail.php

  This page controls the look of individual thumbnails.  You have access
  to several php variables relating to the file itself:

  $File['url']  - link to zoom.php to view the the thumbnail
  $File['turl'] - the location of the thumbnail itself
  $File['size'] - size paramaters for the <img> tag
  $File['name'] - the name of the image

zoompage.php

  This is probably the most complicated page you'll have to deal with.
  It's also the most fun.  You have access to the following variables
  that relate to the image itself:

  $File['width']       - pixel width of current zoom-view
  $File['height']      - pixel height of current zoom-view
  $File['size']        - size paramaters for the <img> tag
  $File['file']        - actual name of the image file
  $File['name']        - name of the image (from filename or .txt file)
  $File['description'] - description of the image from .txt file

  You also have the filenames of the next and previous files in the
  directory:

  $LastFile
  $NextFile

  Because these can sometimes be blank, I suggest that you wrap their
  display in an if-statement, as has been done with the default page.
  Also, don't forget to provide the proper link to zoom.php:

    <A Href="zoom.php?file=<?=$LastFile?>">

  Lastly, because the script detects whether or not you can zoom an
  image (eg. you can't display a 640x480 image at 1024x768), you won't
  always be able to use the zoom links.  For this, I've provided:

  $CanZoom

  This is a boolean that will be true only when the image is large
  enough to be allowed to zoom.  To get the <select> with the available
  zoom options themselves, use the following function:

  getZoomSelect()

  This returns exactly that - any available resolutions, based on the
  size of the image, and what you have configured in conf.php

