PHPhotoalbum
---------------------------
Version:	0.5
Released:	2004-03-28
Author:		Henning Støverud
E-mail:   	henning@stoverud.com
URL:		http://www.stoverud.com/PHPhotoalbum/
		

What is it?
---------------------------
PHPhotoalbum is a picturegallery script. You can upload pictures directly
from your webbrowser. The script generates thumbnails on the fly. 
Users can comment each picture. View statistics about the pictures.
TopXX list. Admin user can delete pictures, comments and albums.


Changelog 
---------------------------
## v0.5 ##
- Fixed security flaws
- Support for previous/next navigation
- Added support for GD 2
- Some minor layout changes
- Script for auomatic creation of db tables
- Added some installation instructions


## v0.4 ##
- adminpages with passwordprotection
- deletion of pics, comments and albums
- choose between ImageMagic and the build in (GD) function for 
  thumbnail creation
- recent uploads
- decide if useruploads should be allowed on album creation
- easier to insert directories
- helppage
- other tweaks :)

## v0.3 ##
- Some bugfixes before the first release.


Notes
---------------------------
The first version of PHPhotoalbum was written for own use only. After
a while, people started asking for the sourcecode. I then decided to 
publish a public version. The response was much greater than I'd expected,
(over 1000 downloads in under a week) so after a few days I started to
implement some new features, and improve the code. It's far from perfect,
but I think it works like it should.

If the interrest is still growing, I'll probably continue developing 
PHPhotoalbum. If you have any suggestinos or comments, feel free
to send me a mail, or post a message in the forum on the webpages.



Requirements
---------------------------
- PHP			I've tested PHPhotoalbum on both PHP 3.0.14 and PHP 4.2.1

- MySQL

- ImageMagic or GD	(to resize pictures, make thumbnails)
					PHPhotoalbum uses the convert command.


Installation
---------------------------
Since you're reading this file, I guess you've already extracted all the files.
If you've downloaded an official distribution of PHPhotoalbum, you should now
have the following directory structure:

PHPhotoalbum/albums/userpics/		# Default upload directory
PHPhotoalbum/albums/				# Directory for pictures
PHPhotoalbum/images/				# Some pictures used by PHPhotoalbum
PHPhotoalbum/						# all .php files and config files.

PHPhotoalbum/albums/ and all it's subdirectories must writable. 
To make sure the directories have the right permissions, run the following
command from your shell:

# chmod -R 777 albums

or change the permissions on the directory from an FTP client.

You must also create a database to store the information in. You can easily create
the nessecary tables by running the dbinit.php script.
Just open http://yourserver/PHPhotoalbum/dbinit.php in your browser and provide the
information needed for your server and press the button!

OR

If you want to create the tables manually, you'll find an sql script in album.sql.

If you have permission to create a new database, this can be done with this command:
# mysqladmin -p create photoalbum

Now you have a database with name "photoalbum". To crate the necessary tables in that
database, you can run this command:

# mysql -p photoalbum < album.sql


Then make sure to change the necessary variables in config.inc.php.

You'll find some tips and hints on how to configure config.inc.php 
in installation.php.

When everythin is set up and working, you should delete the following files:
- dbinit.php
- installation.php
- phpinfo.php
These files give away information about your server and should be deleted.


Upgrade
---------------------------

-- From v0.4 to v0.5 --
First: Remember to make a backup of your config.inc.php!
There are no changes to the database. Just unzip the files and overwrite
the old files with the new ones. It is one important change in 
config.inc.php. You have to provide the path to where "convert" (ImageMagick)
can be found.

$config['imagemagick_path'] = "/usr/bin/"; 

If you are using ImageMagick you have to change this to whatever is correct for
your server. If you are using GD, you can safely ignore this.


-- From v0.3 to v0.4 --

If you already have PHPhotoalbum v0.3 installed and want to upgrade to
v0.4, I haven't made any upgrade scripts. If you want to do it manually,
its possible. You can safely replace all the old .php files with the new.

It is one change to the MySQL database. It's a new field called uploads in 
the table album_albums. Take a look at album.sql and make the changes.

I guess things should work if you do this.