Whitealbum

WHITEAlbum was born when I required a clean looking, lightweight application to make my digital photos accessible to friends and family. I also wanted the ability to caption images and allow others to add comments. Those who are used to FTPing their images somewhere and would like the rest to be done for them should appreciate WHITEAlbum.

To run the application you will require a server running PHP and have access to a My SQL database. I have assumed that those who have access to this would be familiar with FTP. As a result, the management of the album structure (ie categories or folders of images) and all adding/deleting of images is done via FTP. Once you are happy with the images on the server and the categories that they reside in, you can fire up the ADMIN tool which will update the database.

INSTALLATION

system requirements

  1. a web server running PHP. (APACHE htaccess is used to authenticate admin system users by default but any server that provides directory protection will do)
  2. access to a My SQL database on this server
file setup
  1. download the package from the subversion repository here
  2. unzip the install files with the directory structure intact.
  3. FTP all the files, with directory structure intact, to your site (preferably a subdirectory somewhere for neatness)
  4. Create a folder called “images” into which you will be putting all your image files. There should be another folder called “admin” that was created when you uploaded all the application files in step 2.

CONFIGURATION

Configuration changes are made by editing the config.php file that should be in your album’s root directory. A standard text editor will be fine to make these changes.

  1. change the value of $cfg['dbaseName'] to whatever your database is called. The default is “album”.
  2. change $cfg['dbuser'] and $cfg['dbpwd'] to your user name and password for accessing this database
  3. IMPORTANT – administration system authentication is done through the script by default. If you prefer to protect the directory that the admin system resides in by setting it up on your server, you can disable $cfg['requireValid']. Otherwise, you should set the username and password for the Admin system with $cfg['adminuser'] and $cfg['adminpwd'], respectively.
  4. The album will attempt to auto generate thumbnails on the fly by default. This requires the PHP GD Graphics library which comes standard with PHP 4.3.0. If your thumbnails are not appearing, chances are your version of PHP doesn’t have the library installed. setting $cfg['autoThumbnail'] to false disables the auto generate option but also means that you must create the thumbnails yourself :-) . See tree structure below for details.

Other configurables

There are a number of settings that can be configured from within the config.php file so if you are wondering whether it is possible to change that way something works, check through the config file – you might be surprised.

Configurable items include:
  • the colour scheme- table backgrounds etc from the config file, styles are configured in the “albumstyle.css” style sheet. you can specify a different style sheet but be aware of the style definitions that the album requires.
  • choose to pop-up the full image in a separate window with the $cfg['popupImages'] variable
  • table sizes
  • the title of the album
  • the number of thumbnails displayed per row

ADDING/REMOVING IMAGES

directory structure

Once you have the album up and running, you will be wanting to populate it with images. This is a simple process that will require you to FTP the image files to the “images” directory that you created earlier. By default, this directory is called “images” and sits in the directory that your album is running from. You can set this to a different directory by changing $cfg['imagePath'] (path to the images directory from the album root) in the config file.

The directory structure underneath your images folder must follow this pattern:
Image directory tree
i.e. each set of images that will register as a link from your album’s index page must be in its own directory under the main images directory. The name of each of these folders is not crucial as you can re-label them to something more descriptive in the administration system.

file upload
  1. connect to your host via FTP and create a sub-directory under your “images” directory for the new set of images to go. NOTE: directory names may not contain SPACE, APOSTROPHE or other extended characters.
  2. upload all the images to the new directory
update database
  1. Point your browser at the administration tool. (http://yourdomain.com/album/admin)
  2. If you are running WHITEAlbum for the first time, select “create database” from the menu and the required tables will be created in the database.
  3. Select “scan directories” from the menu. You should see feedback about which new folders and images were found and added to the database.

MANAGING IMAGES/FOLDERS IN YOUR ALBUM

Simply add or removed whatever files or folders you wish, using your FTP program of choice. Once you have made all your changes on the server, go to the Administration tool and “scan directories”. The changes will be detected and your database, updated.

THUMBNAILS

WHITEAlbum uses PHP to ‘auto-generate’ thumbnails by default. This requires the GD graphics library (standard in PHP 4.3.0 and later).

If you can not use the auto generate thumbnails feature then you will have de-active this in the config file and create the thumbnails yourself. Upload the thumbnails to a sub-directory (called “thumbnails”) of the folder in which all the full-sized images are saved.

Each set of images will have a “thumbnails” subdirectory which contains all the carefully constructed thumbnails that go with the images. As a reference, the longest side of the thumbnails should be not much longer than 60 pixels. Adobe Photoshop has a nice batch job feature that you can configure to create thumbnails for you.

UPDATES

To update your version of WHITEAlbum, just replace your files with the newer versions that you download. The Album will continue functioning as normal. In most cases, you only need to replace the ‘albumapi.php’ file. Check the version history page which will specify which files need to be replaced.

LEGAL STUFF

This software is provided free of charge under the terms of the GNU General Public License (GPL).

I do not guarantee that this software is free from defects. It is provided “as is,” and you use the software at your own risk. I make no warranties as to performance, merchantability, fitness for a particular purpose, or any other warranties whether expressed or implied.

No comments

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.