Zoph 0.5.x -> 0.6 update
4 june 2006

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.


Updating the Database

If you are upgrading from an older version than 0.5, please run the older database updates first. It is not necessary to 
update to 0.5.1 if you are still running 0.5.

Execute zoph-update-0.6.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.6.sql

The database upgrade script makes the following changes:

    * Add sortorder fields to albums and categories
    * Add url + description fields to places
    * Make changes needed for user comments:
          o Add table for comments
          o Add table to link comments to a photo
          o Add a field to a user to indicate whether or not this user can make comments
    * Add a table to create relations between photos
    * Change the rating field length, because it couldn't hold a 10 and was truncated to 0 decimals in a previous version.


Configuration updates
(see http://en.wikibooks.org/wiki/Zoph/Configuration for details):

New options
    * ALLOW_COMMENTS
    * MAX_UPLOAD (was hardcoded to 10MB in 0.5.1 and before)

Changed options
    * USE_IMAGE_SERVICE is now on by default
    * DEFAULT_TABLE_WIDTH again has support for % (this was accidently removed in 0.5), please note that it is now
      required to specify the entity ("px" or "%").


Perl script changes

As of v0.6, no settings need to be made in zophImport.pl and <zophExport.pl, it is replaced by a settings file 
.zophrc in the home directory of the user that runs these scripts. An example file called zophrc.sample is 
included with Zoph:

#-----------------------------------------
# Configuration file for Zoph
#-----------------------------------------
#
# Rename this file to .zophrc and place it in your home directory.
#
# All settings must match the settings with the same name in config.inc.php
#
# edit these to reflect your database
$db_host = 'localhost';  # hostname or hostname:port
$db_name = 'zoph';
$db_user = 'zoph_rw';
$db_pass = 'pass';
$db_prefix = 'zoph_';

#
# set this to your image directory
#
$image_dir = '/data/images/';
#-----------------------------------------

Note: the Debian version of Zoph was already using this configuration.

Zoph 0.5 -> 0.5.1 Upgrade
12 March 2006

Copy over php/* to the location of your installation. Make sure to also copy
the php/lang subdirectory. No datebase changes are needed for this release.

Zoph 0.4 -> 0.5 Upgrade
21 Jan 2006

Copy over php/* to the location of your installation. Make sure to also copy
the php/lang subdirectory.

Updating the Database
---------------------

If you are upgrading from an older version than 0.4, please run the older
database updates first.

Execute zoph-update-0.5.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.5.sql

The database upgrade script makes the following changes:

    * Change the password length to 64 bytes. Needed for Mysql 4.1 compatibility.
    * Changes to the places table for hierarchical locations:
          o add the parent_place_id column.
          o copy the location that currently has place_id 1 to a new place_id.
          o Update all the photos taken at that location
          o Change place_id 1 to "World" (You may want to change that)
          o And finally makes all the other places a child of "World".
    * Add a column to the prefs table for opening fullsize photos in a new Window
    * Add a column to the album_permissions table for the watermarking feature

Configuration updates
---------------------

A few new configuration options have been added in Zoph 0.5.

Forcing SSL
-----------
You can now force the usage of SSL for the web interface, either just for
logging on or for the entire Zoph session. You can control the behaviour by
adepting the following settings:

define('FORCE_SSL_LOGIN', 0);
define('FORCE_SSL', 0);

You will also need to tell Zoph at what URL it can be found, because it will
need to redirect users from SSL to plain and vice versa:

define('ZOPH_URL', 'http://myserver.com/zoph');
define('ZOPH_SECURE_URL', 'https://myserver.com/zoph');

For more details see FORCE_SSL_LOGIN, FORCE_SSL, ZOPH_URL and ZOPH_SECURE_URL
on http://en.wikibooks.org/wiki/Zoph/Configuration

Watermarks
----------
You can now have Zoph add a watermark to the high resolution images, to prevent
unauthorized use of your photos. The watermark is a partly transparant GIF
image that needs to be placed in your IMAGE_DIR. To use watermarking, make the
following changes to your configuration:

define('WATERMARKING', 1);
define('WATERMARK', 'watermark.gif');

You will also need to enable the image service if you have not already done so:

define('USE_IMAGE_SERVICE', 1);

For more details see WATERMARKING, WATERMARK and USE_IMAGE_SERVICE on
http://en.wikibooks.org/wiki/Zoph/Configuration

Web importer
------------
A few changes have been made to the web importer. To delete an uploaded ZIP
file after a successful import, change this line in the configuration:

define('REMOVE_ARCHIVE', 1);

To enable dated directories in the Web importer:

define('USE_DATED_DIRS', 1);
define('HIER_DATED_DIRS', 0);

To enable hierarchical dated directories in the Web importer:

define('USE_DATED_DIRS', 1);
define('HIER_DATED_DIRS', 1);

The default UMASK and DIR_MODE have been changed as of v0.5:
define('IMPORT_UMASK', 022);
define('DIR_MODE', 0755);

For more detais, see REMOVE_ARCHIVE, USE_DATED_DIRS, HIER_DATED_DIRS, 
IMPORT_UMASK and DIR_MODE on http://en.wikibooks.org/wiki/Zoph/Configuration

Adding multiple people at once
------------------------------

You can now add multiple people at once using the edit photo page or the bulk
edit mode. To enable this feature, set MAX_PEOPLE_SLOTS to a reasonable
maximum (recommendation: 5-10).

define('MAX_PEOPLE_SLOTS', 5);

After that, go to the preference page and set "number of people to add at once"
to a number that is convenient for that user. Each user can indivually set this
number, but never higher than the number defined in MAX_PEOPLE_SLOTS. Bear in
mind that setting either to a (very) high number, could (severely) impact
performance.

For more detais, see MAX_PEOPLE_SLOTS on
http://en.wikibooks.org/wiki/Zoph/Configuration

-----------------------------------------------------------------------------

Zoph 0.3.3 -> 0.4 Upgrade
1 Aug 2005

If you are upgrading from an older version than 0.3.3, please run the older
database updates first. If you have been using a 0.4-pre version, you do not
need to update the datebase again.

Updating the Database
---------------------

Execute zoph-update-0.4.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.4.sql

The database upgrade script makes the following changes:
- Changes the name of all the tables to zoph_<old name>. If you do not want this,
  comment out the lines starting with "rename table". Make sure the variable
  DB_PREFIX in config.inc.php and $db_prefix in zophImport and zophExport match
  your choice.

- Adds a few columns to zoph_album_permissions and zoph_users, to be able to
  monitor such as changes to permissions and last login.

- Adds "email" to people.

- Makes modifications for the new rating system, where multiple ratings can be done
  on a single photo and average is calculated automatically.

Updating configuration
----------------------
A number of configuration items have been added since v0.3.3. You can use the list below
to update your current configuration file, or simply use the one in the distribution and
change it to your needs.

Set DB_PREFIX to a prefix for each tablename, see db update for details. Suggested is
to use 'zoph_', as this will be the default in future releases. Make sure $db_prefix in
zophImport.pl and zophExport.pl matches this setting.

Much of the style information has been removed from the HTML code and is now in a separate
CSS file. Please set CSS_SHEET to 'css.php' to load the CSS file.

You can now choose the authentication method used by zoph; set $VALIDATOR accordingly.
Possible choices:
- 'default_validate': use the 'old' authentication method, probably the best
  choice for most.
- 'htpasswd_validate': use htpasswd to validate users.
- 'php_validate': let PHP take care of validation. See http://www.php.net/features.http-auth
You could also write your own authentication module; make it a function in validator.inc.php
and set $VALIDATOR to it's name.

You can automatically send a copy of each e-mail sent from Zoph to a predefined address by
setting BCC_ADDRESS to that address. Zoph includes a link to the site when notifying a user
of (new) access rights. If Zoph is unable to determine the correct URL itself,
please set ZOPH_URL to the correct value. 

If you want to be able to annotate photo's, set ANNOTATE_PHOTOS to 1 and set ANNOTATE_TEMP_DIR
and ANNOTATE_TEMP_PREFIX to a sensible value (suggested: '/tmp' and 'zoph').

To set the destination path in the web import to some default value, define the variable
DEFAULT_DESTINATION_PATH; suggested value: 'uploads/date(Y.m.d)'. To hide this path from
non-admin users, also define SHOW_DESTINATION_PATH and set it to 0, if you do not want to
hide it, set it to 1.

To allow users to rate photos, set ALLOW_RATINGS to 1; otherwise to 0.

Zoph can now rotate images for you. Add the following settings and adapt where needed:
	     // allow images to be rotated
  	     define('ALLOW_ROTATIONS', 1);
  	     define(ROTATE_CMD, 'convert');
  	     //define('ROTATE_CMD', 'jpegtran');
  	     // set to 1 to backup the original before it is rotated
  	     define('BACKUP_ORIGINAL', 1);
  	     // copy the original to a file with this prefix
  	     define('BACKUP_PREFIX', 'orig_');


-----------------------------------------------------------------------------
Zoph 0.3.2 -> 0.3.3 Upgrade
13 Dec 2002

If you are upgrading from a version previous to 0.3.2, please run the older
database updates first.

Updating the Database
---------------------

This update adds a new column to the prefs table.

Execute zoph-update-0.3.3.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.3.sql

Updating the Templates
----------------------

Copy over php/* to the location of your installation (back up your old
config.inc.php first if you need to).  Make sure to also copy the php/lang
subdirectory as there are additions to the language files.  

There are a few new settings in config.inc.php.  The old WEB_IMPORT setting
was replaced with CLIENT_WEB_IMPORT and SERVER_WEB_IMPORT so that you can
enable/disable one or the other if you like.

This release also supports the uploading of zip and tar files.  Set the
UNZIP_CMD and/or UNTAR_CMD to enable this.  This feature extracts the images
to a temp folder before loading them.  The path to this folder is set by
EXTRACT_DIR.

Another new feature is the addition of a pref to let photo descriptions appear
under the thumbnails.  The MAX_THUMB_DESC config sets the maximum number of
characters to display.

A New Export Script
-------------------

You'll find a new perl script in this release, bin/zophExport.pl, which can
be used to create static html galleries of your photos.  See the manual for
more info.


-----------------------------------------------------------------------------
Zoph 0.3.1 -> 0.3.2 Upgrade
17 Oct 2002

If you are upgrading from a version previous to 0.3.1, please run the older
database updates first.

Updating the Database
---------------------

The only thing added in this update are four new color schemes.  You an skip
this if you don't think you will use them.

Execute the statements in zoph-update-0.3.2.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.2.sql

Updating the Templates
----------------------

Copy over php/* to the location of your installation.  Make sure to also copy
the php/lang subdirectory as there are additions to the language files.  Also
included in this release are the htmlized docs, in the php/docs/ directory, if
you want them.

There are two new additions to config.inc.php: a VERSION variable and the
DEFAULT_SHOW_ALL setting.  The DEFAULT_SHOW_ALL setting makes all people
or places shown by default when you visit the people or places pages.  If
you don't have hundreds of records this is probably more convenient than
defaulting to 'a'.  It is enabled by default.

That's it for this release, but I'll mention one bug fix for a problem a few
users may have noticed: if you used zophImport.pl to load images that were
on a different filesystem than your images directory, everything would
apparently work but the original images would not be copied.  You might not
have even noticed the images were missing unless you tried to view the full
sized images in your browser.  This release fixes this problem and makes sure
other sorts of silent failure won't occur.


-----------------------------------------------------------------------------
Zoph 0.3 -> 0.3.1 Upgrade
30 Sep 2002

If you are upgrading from a version less than 0.3, please run the previous
database updates first.

Updating the Database
---------------------

Execute the statements in zoph-update-0.3.1.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.1.sql

None of the database changes should create incompatibility with version 0.3.
You should update the db before updating the templates.

This database update attempts to delete some table accidentally included
in zoph.sql in version 0.3.  If you originally installed a prior version
you probably do not have these tables and the update will fail when the
"drop table" statements are reached.  That isn't a problem, the other
statements should have successfully executed first.

Updating the Templates
----------------------

Copy over php/* to the location of your installation.  Make sure to also copy
the php/lang subdirectory.

There are no changes to config.inc.php this release so you can backup your
version and then copy it over again.


-----------------------------------------------------------------------------
Zoph 0.2.1 -> 0.3 Upgrade
20 Sep 2002

If you are upgrading from Zoph 0.2, first update the database as described
in the "Zoph 0.2 -> 0.2.1 Upgrade" section below.

Updating the Database
---------------------

Execute the statements in zoph-update-0.3.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.sql

None of the database changes should create incompatibility with version 0.2.1.
You should update the db before updating the templates.

Updating the Templates
----------------------

Copy over php/* to the location of your installation.  Make sure to also copy
the new php/lang and php/images subdirectories.

You may want to first backup your config.inc.php so you can copy your database
settings over to the new config file.

Section 3 of the INSTALL file, "Configuring the PHP templates", has been
updated to include information on the new config file settings.

The REQUIREMENTS document has info on what is need to use the new web importer.

The TUTORIAL has been updated to include information on using the web importer
and viewing Zoph in other languages.

The db.inc.php template isn't needed anymore (and wasn't in the last release
either, but it was accidentally included in the download).  You can delete
it if you like if it's still in your template directory.

If you are running PHP 4.2 and had to enable register_globals to get Zoph to
work, with Zoph 0.3 this is no longer required.  It is recommended that you
disable register_globals in php.ini now.  Also, to use the web importer you
may need to increase the max_execution_time in php.ini to something more
than the default of 30 seconds.

Configuration Changes
---------------------

In versions of Zoph prior to 0.3, thumbnails were generated as the same file
type as the original image (a jpeg image would have jpeg thumbnails, a gif
image gif thumbnails, etc).  As it may be desirable to instead have all
thumbnails be the same type (there probably is no need, for example, to
create uncompressed tiff thumbnails of tiff images), Zoph 0.3 allows you
to specify that all thumbnails should be of the same type.

If all your images are the same type or if you don't mind having different
sorts of thumbnails, you can skip this.

The default settings maintain compatibility with previous versions.  If you
would like to switch to a single thumbnail format, do the following:

In zophImport.pl

- set $mixed_thumbnails to 1
- set $thumb_extension to whatever you like (jpg, for example)

In config.inc.php set MIXED_THUMBNAILS and THUMB_EXTENSION to the same
values as zophImport.pl.

If you make this change and have previously generated thumbnails with an
extension different from THUMB_EXTENSION, you will need to regenerate
the old thumbnails.  A command like the following can take care of that
(this one finds gifs and makes jpgs):

> find images/ -name "thumb_*.gif" -o -name "mid_*.gif" | perl -nle '$old = $_; s/\.(\w+)$/.jpg/; $cmd = "convert $old $_"; print $cmd; system($cmd);'

You can then get rid of the old thumbnails.

Preferences Changes
-------------------

There are two new settings on the prefs page:

"Days past for recent photos links" sets the number of days used for the
recently taken/modified links on the home page.

"Language" set the language to display.  See the TUTORIAL for more info.

The PHP Importer
----------------

This version comes with a web based importer.  If you are planning to use
this feature you may need to install the following:

- GD 2.0
- PHP 4.2

See the first section of the REQUIREMENTS doc for more info.



-----------------------------------------------------------------------------

Zoph 0.2 -> 0.2.1 Upgrade
21 June 2002

If you already have Zoph 0.2 installed, upgrading is fairly simple.

Updating the Database
---------------------

Execute the statements in zoph-update-0.2.1.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.2.1.sql

None of the database changes should create incompatibility with version 0.2.
You should update the db before updating the templates.

Updating the Templates
----------------------

Simply copy over php/* to the location of your installation.  You may want
to first backup your config.inc.php then copy it over.

If you do keep you previous config.inc.php, be aware of one addition to that
file.  Copy the lines defining the DEFAULT_USER from the new config.inc.php
to your file.

If you plan on using the new default (guest) user feature, read "Defining a
Default User" in the "Creating Users" section of the tutorial.
