This photo library is a large group of web pages that cooperate. On this page the cooperating pages
are listed and how they work together is discussed. The pages were originally coded in Cold Fusion
and have been migrated to PHP for further development.
The Photo Organizations
Photos can be organized into photo essays. The photo essays are manually created web pages that
reference the photos directly. The photo library does little to help with the creation of these pages.
Photo essays are strictly optional but they are the best way of telling a story with photos.
People in photos can be identified. All photos with a particular person in them can be shown.
A person can be in any number of photos.
Photos are arranged into logical sets called stories.
A story is similar to a photo album but adds the concept of
associating text and comments with each photos. The stories are organized manually.
A photo can be a member of any number of stories.
Adding or removing photos from stories is a management activity available to all logged in users.
Initially each photo is placed in a directory that can be thought of as a roll of film.
These directories house the physical representation of the photos and include thumbnails, images
and big images. They tend to be bulky and unorganized with a large number of photos in each directory.
The directory structure is chosen to match the directory structure created by the
Adobe Photoshop Automate->Web Photo Gallery... command. In each subdirectory there is a copy
of the photo at a different scale. The 'big' directory is where the original pictures are stored. The other
directories have copies scaled to a different size.
The file dragonstyle.css is used to help establish a common look to each page. The page background is set here.
Common Header and Footer Routines
The pages maintain a common look and feel through the use of service routines that generate headers,
footers and error messages.
See the discusson of service routines later in this document.
User Identification and Password System
???Discuss pw file suite.
Password Library Routines
Library routines for the password and user library are contained in pwuser_auth_fns.php.
Most pages start by invoking the function pageInit(true). pageinit() is a function outside the
password system but it usually invokes pw_loginByCookie(). pw_loginByCookie()
checks for the user name and password retained in a cookie on the client.
If the user name and password validate correctly
the user is logged in. Session parameters are set to record who the user is and identifying information
about the user.
Password System Session Variables
The password system session variables are used internally by the password system. They are
registered as session variables so they will be available on many pages without login
being required on each page.
A small number of service functions observe these variables and report password system status.
Example service functions are: pw_isLoggedIn(), pw_isCurrentUserManager(),
||1 if the password system has correctly validated a user and the user is logged in.
||1 if the user is logged in and is designated a manager in the Users table.
||The name of the current logged in user. (fetched by pw_getCurrentUserName())
||The userID of the current logged in user. (fetched by pw_getCurrentUserID())
Photo Library Data Structures
Data for the photo library is stored in a database. The following tables are defined:
Password System Pages
Create or update a user. A logged in user is permitted to update himself.
Available only to managers. Lists all users and provides buttons to add a user or update a user.
Logs out of the system. The cookies used to remember the user and login information about that user
are removed. The session variables are reset.
Requests a user ID (email) and password from the user and logs in as that user.
Service Pages: Used Internally
Invoked by pwrequest.php to check if the user exists and has given the correct password.
Sets session variables pwv_username, pwv_ismanager and pwv_loggedin.
Updates user information in the database. Used by pwaddupdateuser.php.
Library of service subroutines used by the other modules.
Photo Library Pages
Reads a directory and adds photos present to the database of photos in the directory.
The photos are initially set to hidden.
Requests a directory path and title. Establishes a new directory.
Requests a story name, title and description. Establishes a new story or modifies an existing story.
Story names are expected to be unique but can be changed. A story can be deleted from this page.
Requests information about a person and establishes the person's name. This mechanism creates
people for the purpose of
using them in the lists of people that appear in photos. Users are a subset of all people.
Creating a person is distinct
from creating a user in that the email and password fields are not required. Once an email is
established a person can become a user by updating the password. The password update can be done
by anyone. It will only be enabled after a link sent in an email to the listed address is followed
to trigger the new password.
Present a list of pictures in a form easy to assign them to
A discussion of how the pages of the Photo Library fit together and work. (This document.)
Present a list of pictures in a form easy to identify the people in each picture.
A list of the directories images are stored in.
Users organize images into Stories. Stories are the organizations people are intended to view.
Presents an overview of the Photo Library along with initial notes. This is the default page.
Present a list of the existing directories for management.
Allow addition of a directory.
Presents a list of the Stories established by the current
user. (All stories if a manager.)
A button for each story triggers addupdatestory.php to modify
An ADD button is provided to create a new story.
Display a list of people that are in photos. Allow a person to be selected and the photos
of that person to be displayed.
Presents a single image and the comments that are associated with the image.
Present a list of pictures which are stored in a particular directory.
Display a list of Photo essays. Each can be selected to go to the individual photo essay.
Present a list of pictures which have been associated by name with a particular story.
Allows simple checkbox choices of which photos to show and which to hide in a directory.
Add or Modify a Picture
Mailing List Pages
The mailing list system uses the password and photo systems to identify people and supply their pictures.
This section describes the additional pages that participate in creating email lists of groups of people.
Lists members of a particular mailing list. Members of the list can add members, remove themselves
and any members that they added. A new mailing list can also be created.
A mailing list for the Brookline Broadband commitee.
Presents the picture of a dog along with links to the related people.
Services used by the dogneighbors.php mailing list.
A mailing list for the Dogs that come to the Warren Playground in Brookline.
All known dogs with the people associated with that dog listed. Allows additional
people to be associated with a dog.
General purpose mailing list used when there is no custom mailing list.
Template used by custom displays of mailing lists. Provides for an extra field.
Used for lists such as the Newman Family mailing list
that have a custom mailing list page.
A group of people who get together to screen unusual films.
Presents a list of available mailing lists. The lists can be selected for display
or update. A list can also be added.
Mailing list for the Newman family.
Service Pages: Used Internally
This style sheet defines formatting, setting defaults for tag attributes.
The style sheet is used from http://www.dragonnorth.com/dragonstyle.css as defined in
a session parameter.
Defines page framework for the site.
To give each page a consistant appearance a block that contains the unique content of the page
is used. The pageStart function is invoked at the beginning of the page and terminated by
the pageEnd function. This block establishes a table where the unique content is
in a single cell of the table. The table is structured so that the cell width shrinks and grows
with the page width and the cell length is however long it takes to fit the content. The
demonstration page demopage.php is shown below
when viewing this page note the header with icon, selections down the left, content at the
right and the footer.
The unique content of the page goes here.<br>
This page is used by the documentation, it is not really part of the site.
Put a proposed new password in the database and send the user a validation message. The
email contains a link which he must click to change the password.
When an email is sent to allow a user to update his password he gets a link to this page which
includes a validation code. The correct validation code for the person will result in an updated