| |
|
|
| |
 |
| | |
Background
|
 |
The purpose of this project was to create an easy-to-maintain photo
album on the web. It uses ASP to dynamically create pages using whatever
image files (JPG or GIF) are stored in the current directory.
It currently supports multiple photo albums using the web servers' standard
directory structure. The designer also specifies a 'top level' (or root)
directory where the photo album directories eminate. The server will then list each
sub-directory as a new photo album; and each file within it, a new
photograph.
|
| |
Technical
|
 |
The code is stored in a number of small files, spread across two
directories. The main directory (/photos/, for example) holds the
following files:
/Photos/default.asp |
This file redirects the browser to showphotos.asp. This is done because Photo Album
need not be the main reason for the site. It could be one of several options.
|
/Photos/back.gif |
The background image for the album. This is placed here because if several copies of
Photo Album are included on the site, this is the only file likely to change.
|
/Photos/showphotos.asp |
This file defines the parameters to control and display the album. The present version uses
seven global variables to define titles, paths and options. It then calls the PhotoMain
subroutine to create and handle the main page. This routine is held in a common file, stored
in 'aspcode/photos/main.asp' and 'aspcode/photos/display.asp'
|
To reduce the code duplication present on the server, Photo Album (and much of
the Blue Dust site) uses a directory called 'aspcode' to include the bulk of
the software. It is somewhat akin to the way Unix works.
The files of interest here are:
/aspcode/photos/main.asp |
The main bulk of the album processing. This requires the cmn_dir.asp file to stop
'clever' people changing the search paths to view other files on the server.
|
/aspcode/photos/display.asp |
A file that contains the display functions (like ShowSmallTitle). It is included from
the '/Photos/default.asp' page (as opposed to /aspcode/photos/main.asp). This allows the
site to be customised easier, as you simply don't include the file, and write your own functions.
|
|
| |
Links
|
 |
| Open in |  | or |
 | window |
|
| |
Taking it further
|
 |
I plan on adding a facility to allow access to different photo
albums, depending on the user or IP address.
|
| |
Related Projects
|
| |
Lonix
Not really a project, but an example of
the photo album in use.
|
| |
|