Photo Album Setup and Use


The Photo Album System was developed to permit relatively easy use and setup by Lawrence Turner, May 2005 and November 2005.

The basic concept is that a data file along with a set of jpg images and jpg thumbnails is used to build an album page with individual photo pages. While the system is not as simple as some of the automatic photo gallery software, it is relatively easy to use. The album page and the individual pages are constructed by the server as they are requested by a browser.

The album page is a table of clickable thumbnail images along with a caption.

The individual image page displays the full-size image and caption. It also contains links back to the album and links to the previous and next image pages in the list.

The photos all need to be in a jpg format:  filename.jpg
Thumbnails need to be generated that are 100x100 pixels and are named:  filenametn.jpg

The images can be selected, edited (cropped, color adjusted, resized, etc.), and saved.
The result can be cropped to a square and resized to 100x100, and saved as a thumbnail inserting a 'tn' at the end of the file name.

This set of pairs of images then need to be moved to the appropriate directory on the server. Each "album" should be set up in its own directory. This directory contains:

In addition a directory needs to be set up to contain the files:

A data file by the name of 'picturelist.dat' then needs to be built and/or edited. There is one line for each image:

filename,caption

The filename is the name of the image file (no extension of .jpg).
The caption is a text message that appears on the album page and on the individual picture page. It may include commas and embedded html tags.

Blank lines in the data file can be used to help visually organize the file—they are ignored in constructing the album.


The album is generated by a file: index.php

This html file (with embedded php) determines the overall appearance of the album which consists of a list (in the same order as the they appear in the data file) of clickable thumbnails and the caption. For use with webstamp, there is a php "insert" _GENALBUM which handles the link to genalbum.inc, etc.

The actual album is generated by a php script: album() which is found in a file genalbum.inc

<?php
  require_once '../../include/genalbum.inc';
  album();
?>

in this example '../../include/' is the directory in which genpicture.inc is found

The individual image pages are generated by: picpage.php

This html file (with embedded php) determines the look and feel of each image page and displays the image, caption, and navagation links.

It requires the use of the php function picture() which is found in a file genpicture.inc

<?php
  require_once '../../include/genpicture.inc';
  picture();
?>

in this example '../../include/' is the directory in which genpicture.inc is found

Once index.php and picpage.php are set up to link to the needed php files and to display the desired look and feel, then adding, deleting, changing the actual images and captions is all determined by the picturelist.dat data file.

Note:

use style in index.php:

em   {display   : none;}

and use in picpage.php

em   {font-family   : sans-serif;
         font-size      : 70%;
        }

permits easy inclusion of photographer or other message on the individual photo page (but not on the album page) via:
caption<br><em>photographer</em>

It is requested that the album page, index.php, include the following attribution at the bottom of the page:

<div align='right'><span style='font-size:70%'>photo album system by Lawrence Turner</span>&nbsp;&nbsp;</div>

photo album system by Lawrence Turner