== PHP Album ver 2.0 == ---- UPGRADING FROM VERSION 1.x ---- -BACKUP- 1. **BACKUP** your existing database in case you lose data (captions, comments, folder desc) in the upgrade. - File Setup - 1. unzip the install files with the directory structure intact. 2. Open the -new- config.php and find the three new parameters + 1 modified parameter (marked with //NEW to v2//), and add them to your existing config.php: $cfg['numThumbs'] = 40; $cfg['sampleThumbsOnHome'] = 2; $cfg['noSubdirsDisplayed'] = 3; + $cfg['sortFolders']="desc"; - now takes 'asc' and 'desc', allowing more control over the sorting of folder names - Update database - 1. point your browser at the administration tool (http://yourdomain.com/album/admin) 2. make sure you have backed up your database then, select "update database" from the "NEW INSTALLATION/UPGRADE" menu which will update the table structure for the v2 architecture. 3. select "scan directories" from the menu. You should see feedback about which new folders and images were found and added to the database. ---- INSTALLATION INSTRUCTIONS ----- -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 MySQL database on this server - File Setup - 1. unzip the install files with the directory structure intact. 2. FTP all the files, with directory structure intact, to your site (preferrably a subdirectory somewhere for neatness) 3. 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 editting 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['dbase'] 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 - administation 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 autogenerate 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 autogenerate 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. table sizes the title of the album the number of thumbnails displayed per row - 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: root[folder] |- admin[folder] L images[folder] <-- note directory structure within "images --> Lphoto set 1[folder] |- image 1[file] |- image 2 . . |- image z L thumbnails [folder required if autogenerate thumbnails feature is off] |- image 1 [file-thumbnail version of image1 but with same name] . . L image z |-photo set 1[folder] |- image 1 |- image 2 . . |- image z L thumbnails [folder required if autogenerate thumbnails feature is off] |- image 1 [file-thumbnail version of image1 but with same name] . . L image z 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 descritive in the administation system. THUMBNAILS If your can not use the autogenerate thumbnails feature then you will have to create the thumbnails yourself and upload them to a sub-directory (called "thumbnails") of the folder in which all the full-sized images are saved. So each set of images will have a "thumbnails" subdirectory which contains all the carefully constructed thumbnails that go with the images. 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. ADDING IMAGES TO YOUR ALBUM - 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 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. select "create database" from the "NEW INSTALLATION/UPGRADE" menu which will create all the tables required for the WhiteAlbum 3. select "scan directories" from the menu. You should see feedback about which new folders and images were found and added to the database. ADDING/REMOVING IMAGES/FOLDERS FROM EXISTING 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.