Logo   Design Notes

Photo Library
Dragon Pots...

Display Content
Mailing Lists
People in Photos

View Photos
All Directories
All Comments
Latest Directories
Latest Photos

Users & Login
Log In...

Design Notes

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.

Style Sheet

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.

Common Usage

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(), pw_userIsManager() pw_getCurrentUserName().
Session VariableUsage
pwv_loggedin 1 if the password system has correctly validated a user and the user is logged in.
pwv_ismanager 1 if the user is logged in and is designated a manager in the Users table.
pwv_username The name of the current logged in user. (fetched by pw_getCurrentUserName())
pwv_userID 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:
  • ???Stories
  • ???PeopleInGroups
  • ???PeopleInPhotos
  • ???Photos
  • ???PhotosInStory
  • ???Users
  • ???SubDirectories
  • ???Comments

Password System Pages

Public Pages

pwaddupdateuser.php Create or update a user. A logged in user is permitted to update himself.
pwlistUsers.php Available only to managers. Lists all users and provides buttons to add a user or update a user.
pwlogout.php 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.
pwrequest.php Requests a user ID (email) and password from the user and logs in as that user.

Service Pages: Used Internally

pwcheck.php 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.
pwpostuser.php Updates user information in the database. Used by pwaddupdateuser.php.
pwuser_auth_fns.php Library of service subroutines used by the other modules.

Photo Library Pages

Public Pages

addnewphotos.php Reads a directory and adds photos present to the database of photos in the directory. The photos are initially set to hidden.
addupdatedir.php Requests a directory path and title. Establishes a new directory.
addupdatestory.php 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.
addupdateperson.php 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.
assignstories.php Present a list of pictures in a form easy to assign them to stories.
designnotes.php A discussion of how the pages of the Photo Library fit together and work. (This document.)
identifypeople.php Present a list of pictures in a form easy to identify the people in each picture.
imagedirectories.php A list of the directories images are stored in.
imagestories.php Users organize images into Stories. Stories are the organizations people are intended to view.
index.php Presents an overview of the Photo Library along with initial notes. This is the default page.
managedirectories.php Present a list of the existing directories for management. Allow addition of a directory.
managestories.php 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 that story. An ADD button is provided to create a new story.
peopleinphotos.php Display a list of people that are in photos. Allow a person to be selected and the photos of that person to be displayed.
photo.php Presents a single image and the comments that are associated with the image.
photodir.php Present a list of pictures which are stored in a particular directory.
photoessays.php Display a list of Photo essays. Each can be selected to go to the individual photo essay.
photostory.php Present a list of pictures which have been associated by name with a particular story.
selectphotos.php Allows simple checkbox choices of which photos to show and which to hide in a directory.
updatephoto.php 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.

Public Pages

addupdatemaillist.php 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.
broadband.php A mailing list for the Brookline Broadband commitee.
dog.php Presents the picture of a dog along with links to the related people.
doglibrary.php Services used by the dogneighbors.php mailing list.
dogneighbors.php A mailing list for the Dogs that come to the Warren Playground in Brookline.
dogstopeople.php All known dogs with the people associated with that dog listed. Allows additional people to be associated with a dog.
emaillist.php General purpose mailing list used when there is no custom mailing list.
emaillistservices.php 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.
filmclub.php A group of people who get together to screen unusual films.
mailinglists.php Presents a list of available mailing lists. The lists can be selected for display or update. A list can also be added.
newmanemail.php Mailing list for the Newman family.

Service Pages: Used Internally

dragonstyle.css This style sheet defines formatting, setting defaults for tag attributes. The style sheet is used from http://www.dragonnorth.com/dragonstyle.css (ftp download) as defined in a session parameter.
library.php Defines page framework for the site.
photolibrary.php A library of javascript functions that are used to display photos dynamically.
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
pageStart("Demo Page");
The unique content of the page goes here.<br>
This page is used by the documentation, it is not really part of the site.
when viewing this page note the header with icon, selections down the left, content at the right and the footer.
postcomment.php xxx
postdirectory.php xxx
postgroup.php xxx
postidentify.php xxx
postperson.php xxx
postphoto.php xxx
postphotostory.php xxx
postupdatepassword.php 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.
postpasswordvalidate.php 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 password.
The Dragonnorth Group
We meld the skills of people with the capabilities of computers.

Images and text Copyright © 2000-2024 by the Dragonnorth Group All rights reserved.
Contact: mnewman@dragonnorth.com