====================================================== SPA Simple Photo Album version 2.5 ------------------------------------------------------ www.gieson.com ©2003 plaino ====================================================== ====================================================== The author (plaino) is not responsible for any problems associated with the installation or operation of this software. If you follow the installation procedure correctly it should work, but it is not gaurenteed, since systems and platforms vary widely. USE AT YOUR OWN RISK. This software was designed for PHP version 4.3.x and tested on both Unix and Windows systems ====================================================== INSTALLATION ====================================================== OVERVIEW: 1. Upload SPA 2. Set permissions to SPA folder to 777 3. Access SPA (index.php) 4. Test the "edit" feature 5. Test uploading a couple of files 6. Upload all of your photos. 7. Reset permissions on SPA folder to 755 --> 1. Upload SPA Drop the SPA file "index.php" into a directory full of images. (note: you may change the name of the file example: default.php) --> 2. Set permissions to SPA folder to 777 Set the directory that you put the SPA index.php file into to 777 (read-write-execute-all) example: You uploaded SPA here: www.yoursite.com/photos/index.php Then set the permissions on the directory "photos" to 777 --> 3. Access SPA (index.php) After uploading the SPA index.php file to the directory of your choice, access it with your web browser. Example: http://www.yoursite.com/photos/index.php Doing this will alow SPA to set up the proper directory structure. If you would like to customize the names of the directories that SPA uses, you may do so by editing the configuration settings found at the top of the index.php file. NOTE: you will need to open the index.php file in a very basic text editor. I recommend something like notepad. The instructions for changing the settings are included within the index.php file. --> 4. Test the "edit" feature Click the "edit" link in the lowser left-hand corner If everything is cool to this point you should be looking at a page that says something like "good job... so on and so forth". Scroll to the bottom of the page and click the "edit" link This will bring you into the "edit mode" page where you can upload photos, edit the text caption of photos and password protect the edit mode link. NOTE: if you ever forget your password, simply delete the file named pwd.txt that SPA generates. NOTE: If you already uploaded images to the SPA directory, it will take a little while for spa to generate the thumbnails... Especially if the images are GIF images. SPA processes GIF images REALLY slow! By default PHP (the scripting language that SPA was written in) is usually limited to 30seconds of processing time--afterwhich the PHP will generate an error stating "30 seconds has been exceeded" It is important to read the information that errors provide. Should you run into any problems you may contact me directly and i'll try and figure out where the problem is. --> 5. Test uploading a couple of files Use the "upload" feature within edit mode or upload images manually via FTP. After uploading your photos, access SPA again to make sure that everything is cool. NOTE: If you get any errors you may have to access index.php a couple of times (see previous"note" for detailed explaination). You should first test SPA with one or two images. --> 6. Upload all of your photos Once you have verified that everything is cool, go ahead and upload the rest of your photos. --> 7. Reset permissions on SPA folder to 755 When you are finished editing the photo album you should reset the permissions on the directory that you dropped the SPA file into to 755 ====================================================== FEATURES ====================================================== - minimalist design - optional slideshow - easy to modify. - front end: stylesheets - back end: customizable options - plugs right into you existing site design. - Add files via FTP or you can do one at a time using while in "edit mode" - Change the location of where the images are stored. ====================================================== CONFIGURATION ====================================================== THE HTML PORTION: To edit the look and feel of SPA you should be familiar with basic HTML and Cascading Style Sheets. The standard HTML portion of SPA resides at the bottom of the SPA file. It is recommended that you use one of the following to modify any code in the SPA file: - A standard HTML edior (Dreamweaver, BBedit, etc) - A standard "text" editor (notepad, simple text, etc) - DO NOT use word-processing software like MS word... i don't even recommend frontpage, since microsoft products have a tendancy to "screw things up." To edit the HTML simply open the "index.php" file in your editor of choice, then scroll down to the bottom of the page... it's pretty straight forward HTML down there. The only thing to pay attension to is a small little snippet of PHP: The photos/table will be displayed where ever you place that little snippet. Feel free to move it around. SPA uses an embedded stylesheet, you can use an external stylesheet if you prefer... just edit the HTML portion of the SPA file. THE PHP PORTION: To edit the functionality of SPA you should not be afraid of PHP. Upon opening the SPA file "index.php" in a text editor or standard HTML editor of your choice you will notice that toward the top of the file there are a number of "options." The options are as follows: Enable slide show feature: To turn this feature off replace true with false $slideShow = true; Default slide show delay time (in seconds): $slideShowDelay = 5; Number of seconds to display in list: (this option is not applicable... it will be in future versions) $slideShowSecondsList = 10; How many images across: $displayAlbumColumns = 3; How many images per page: $itemsPerPage = 6; The size to to automatically place in the "icon size" box for uploads: this option is disabled in the demo version. The "default icon size feature does not fuction in this demo version. $defaultIconSize = 50; ////////////////////////////////////////// optional configs ////////////////////////////////////////// Name of the directory where the small pics go. $albumThumbDir = "thumbnails"; Name of the directory where the big pics go. You can put the larger images in their own directory like Adobe Photoshop does. Specify the name of the directory here: In this example the "big" images will go into the same directory as the SPA file: example (default): $albumBigDir = ""; In this example the images will go into a directory named "images" example: $albumBigDir = "images"; Name of the directory where the picture/album description text files go. $albumInfoDir = "info"; This functionality hasn't been built in yet. $albumCommentsDir = "comments"; ====================================================== NOTES ====================================================== On Sorting: The sorting is based on alph-numeric consideration. In other words, file names with number are shown first, then files are displayed alphabetically. Example: pic1.jpg pic2.jpg pic3.jpg picA.jpg picB.jpg picC.jpg picD.jpg picE.jpg Now, as a hack, if you want to change the order of the list above you can simply change the file names by putting a numbers in front like so: 1_picD.jpg 2_pic3.jpg 3_pic1.jpg 4_picA.jpg 5_pic2.jpg 6_picC.jpg 7_picB.jpg 8_picE.jpg ====================================================== CHANGE LOG ====================================================== 2003 dec 13 - changed the password field so that it displays hidden text (••••••) - modified the "sort" function so that it will sort a little more naturally 2003 nov 7 - fixed bug where SPA would "hang" (or "time out") on certain servers. 2003 Oct 21 - fixed bug with manual uploads - fixed bug with "sessions" 2003 OCT 17 - added support for adding GIF and PNG images. 2003 OCT 7 - Replaced "home" with "thumbnail view" so that users can return to a page of thumbnails that contain the big image previously viewed (rather than go back to page one and try and "guess" which page the thumbnail is on. Thanks to Ken at www.brain-dump.net for realizing this issue.