Initial Point - Image Gallery Version 0.9 May 2007 ------------- Description ------------- This software allows for automated or manual slide shows on a web site. It has several options that the user may control and has an administrative page to facilitate the management of the picture collections. ------------- License ------------- Licensed under the terms of the GNU Lesser General Public License: http://www.opensource.org/licenses/lgpl-license.php -------------------- System Requirements -------------------- To use this software you will need the following: - Access to a web server (I am using a Windows-based system but a Linux or Macintosh system will work similarly) - Possibly access to the server's php.ini file - Support for PHP on the server - Support for the PHP GD library on the server (probably is if the latest PHP is installed) - text editor to make configuration changes ------------- Contents ------------- The gallery directory. This is the main application and contains: changepass.php Change password config.php Basic config file deleteselection.php Deletes selected images directorydeleter.php Deletes selected directory hashfile.enc Contains the admin password hash imagebuilder.php imagedeleteselector.php Select image to delete from a list of thumbnails index.htm Forwards browser to index.php index.php The main page passwordblank.php Serves up a page notifing the user that the password file was blank passwordwrong.php Serves up a page notifing the user that the password was wrong readmebuilder.php Writes a new readme.txt file show.php The automated slideshow showstyle.css CSS stylesheet singleView.php The manual slideshow thumbbuilder.php Rebuild the thumbnails in a given directory thumbs.php View the thumbs in a given directory upload.php Saves images from an upload uploadform.php The main admin page thumbs Directory that holds the thumbs that show on the index.php page Senior_High_Architecture A directory of sample images The uploads directory. This is an option application that allows users to upload images: config.php Basic config file index.php The main user page upload.php Saves images from an upload -------------------------- Basic Installation -------------------------- Unzip the original file in a folder of your choice on your computer. Place the "gallery" directory in the documents directory on your webserver. If you plan to allow users to upload their own images, place the "uploads" directory on your server as well. --------------------------- Configuring - Basic --------------------------- To use this application, you only need to make a few changes to the configuration file. Open the "config.php" file that is in the "gallery" directory using any convenient text editor. You will see the following options: $activity = "My Photo Gallery"; // default "My Photo Gallery" //$uploadspath = "../../uploads/"; //path to user upload page if enabled $pathtomainpage = "../../"; // where is the page that sent us to this site $barbackgroundcolor = "#ff6600"; // default "#ff6600" $headerbackgroundcolor = "#ff6600"; // default "#ff6600" $tablebackgroundcolor = "#ffffcc"; //default "#ffffcc" $headerfontcolor = "#ffffff" //default "#ffffff" Line 1 You can give your site a name by making the appropriate change to the first line. Line 2 If you plan to allow users to upload their own pictures, remove the two slashes at the beginning of the second line and enter the correct path to where you installed the "uploads" directory during basic installation. Line 3 This is the path back to the page that sent is to our page. Changing this with allow the link at the botton of our main page to work properly. Lines 4 - 7 These setting control the colors of your site. Save your settings. Upload this file to your web server if you are not working directly on the server. The application should be ready to go. Just access the "gallery" directory on your server and you will see the main page. The pictures that display on the main page are sample that are stored in a "thumbs" directory in the "gallery" directory. You can delete those images and add your own. They are in the .jpg format and the long side of the image is 100 pixels. They are loaded in a random order everytime the main page is accessed. --------------------------- Configuring - Admin Uploads --------------------------- For you to upload images from this application, your webserver must be configured to allow this. It is outside the scope of this documentation to explain how this is accomplished, but here are a few tips: - uploads must be enabled in the php.ini file - uploads must be enabled in your webserver application - check the size of maximum uploads allowed if you are experiencing problems --------------------------- Configuring - User Uploads --------------------------- If you wish to allow users to upload images, you need to install the "upload" directory as mentioned above. In the "upload" directory there is another "config.php" file. It has one line that will need modification: $pathtogallery = "gallery/"; // where is the folder where the photos will be uploaded Change the path to where you have installed the "gallery" directory. It can be specified as absolute or relative. Next, you need to might want to make changes to the "upload.php" file in the "upload" directory. This file has the option of sending you email to let you know someone has sent images to your site. There are two ways that it can do this. It can use PHP Mailer, if it is installed on your system, or the PHP mail function. See the source code for more information if you wish to enable this option. By default, the mail function is disabled. To create a link to the user upload option, you will need to make a change to the index.php file that is stored in the "gallery." Open that file and look at line 431. Remove the comments below that line. When a user uploads photos, a directory is created in your "gallery" directory. The name of the new directory is the letter "x" followed by the date and time the directory was created. The main application will ignore this directory so you will have the opportunity to review the content before making it available on your site. To make it available, just rename the directory, starting the directory name with anything other than a lowercase "x." ------------------------ Administrative Access ------------------------ From the main page of the application you will see a place to type in a password for administrative access. The default password is "password" so it is highly recommended that you change it as soon as you log in. The password is stored in the "hashfile.enc" file in the "gallery" directory. It is encrypted using a DES-based encryption. If you forget your password, you will need to reinstall the original "hashfile.enc" to reset the password to its original value. Once logged on as administrator, you can upload images, rebuild thumbnails, the readme.txt file, and delete images and directories. In practice, I will upload images via FTP and use the admistrator page to build the thumbnails and readme.txt file. -------------------------------- Copyright (c) 2007, Vince Long -------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA