My Photo Gallery (version 2.5)

Please read everything but email me if
(1) you do not understand (2) you get it running (so I can check it out and put up a link to your site)
at mike@fuzzymonkey.org
In this README:
REQUIRES
SUMMARY
FEATURES
DISTRIBUTION / LICENSE
INSTALLATION
HOW TO USE
CHANGES
TODO
REQUIRES
  • 1. web server (only tested on UNIX and LINUX)
  • 2. Perl 5.00503 (may work with others)
  • 3. ImageMagick (with PerlMagick) 5.2.2
  • 4. Image::Info and IO::String (to get EXIF data stored in the images by digital cameras).
    NOTE: if you do not have root access to install these perl modules, just follow the easy instructions in README.IMAGEMAGICK to install them locally.
  • SUMMARY
    My Photo Gallery is a Web-based photo gallery with support for other filetypes. It is easy to setup and even easier to maintain. Slick-looking image/file galleries and thumbnails are generated on the fly from the directory that you specify. Creating an album is as easy as creating a directory and FTPing your pictures to that directory. A Web administration interface is available, and updating is just as easy. It also includes advanced features such as image logging, resizing, extracting EXIF data from digital cameras, and visitor comments. Many other file formats are recognized and given a special icon.
    FEATURES
  • Automatic creation of photo,movie, and file galleries
  • Simple ftp your stuff or use the web based manager
  • Pretty file name option (in config file)
  • Automatic thumbnail generation
  • Automatic creation of various sizes of each image so that your visitors can specify the viewing size of their preference.
  • Logging for each time a picture or album is viewed.
  • Shutterfly.com support to allow your visitors to order prints.
  • Manage your photo galleries from the web.
  • Previous/next picture buttons with thumbnail preview
  • Automatic extraction of EXIF data embedded from most digital cameras
  • Easyily themable with your custom colors, logo, and main page
  • Configurable filetype support to support any filetype for download
  • Upload, rotate, or delete images using the web manager interface
  • I am sure there is more that I cannot think of.
  • DISTRIBUTION / LICENSE
    This software is released under the GPL. Please see the included LICENSE file. Copyright (C) 2000 Michael Spiceland 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 Use this script at your own risk! I make no warranties that it is hack proof!
    INSTALLATION
    IMPORTANT: You must have the perl modules listed in the requirements section before this script will work. Even if you do not have root access, you can install them locally using the instructions in README.IMAGEMAGICK. Read the FAQ or Intro to CGI at http://www.fuzzymonkey.org/perl/ to easily troubleshoot it.

    1. Install scripts
    This script will need two directories. One for the scripts and one for your images. Here is what I use:
    /home/username/www/cgi-bin/photo/ (to store all the script stuff)
    /home/username/www/photo/ (to store all of the images for display)
    For example, this is what I do:

    ftp myphotogallery.tar.gz into my www/cgi-bin/
    tar -zxvpf myphotogaller.tar.gz
    cd photo/
    mkdir /home/username/www/photo (to be the root directory for the galleries)
    mv site-images/ /home/username/www/photo/

    At this point you should make sure that when you execute the script that it will have the proper permissions to read and write to both of these directories. See the FAQ on my ste at http://www.fuzzymonkey.org/perl/ for more information.
    2. Configure My Photo Gallery

    Edit sitevariales.pl (in the cgi-bin/photo/ directory) to suit your needs. You will need to make sure the directories chosen in the two above steps are in this file correctly.

    Edit news.html. This is a plain text file that will contain any html you wish to display on the main page.

    If you had to install Image Magick with NON-root permissions (the work around described in the README.IMAGEMAGICK) make sure you add the use lib ""; line to both index.cgi and protected/manage.cgi. I use the following two lines at the top of both scripts:

    use lib "/home/username/www/cgi-bin/local/lib/site_perl/5.6.0/i686-linux/"; #ImageMagick
    use lib "/home/username/www/cgi-bin/local/lib/site_perl/"; #Image::Info and IO::String

    You can easily change the entire look of your galleries. There are a few basic ways to change the look:

  • modify the colors in sitevariables.pl
  • upload a new logo to site-images/ and specify it in sitevariables.pl
  • upload new buttons and images by simply replacing the old ones in site-images/
  • update the news.html (your frontpage of the gallery) to look as you want.
  • 3. Create your photo galleries
    If you wish, this step can be done later. It can be done by either FTP or using the handy web based admin script. You will have to fully set everything up before using the web tool, so come back then. Both methods are covered below. If you choose to use the manager.cgi that is in the protected/ directory, please password protect the directory. If you do not know how to do this, ask your server admin or remove the script. Because it allows for upload capabilities that are not secure, it would be a major security hazzard to leave it unprotected. Now you need to mv or upload your pictures into directories under the directory created in the step above. For example, if you use the directory mentioned above you could make a directory /var/www/html/photo/florida2000/ and then put all the pictures from the florida trip in that directory. You can make as many of these directories as you like. I will from now on call these "albums". Alternatively, you could use the protected/manager.cgi to create and upload all of your pictures. It is more friendly, but not as fast as just using FTP.
    4. SECURE YOUR MANAGER.CGI OR DELETE IT !!!!!
    IMPORTANT: You should use htaccess or some other method of password protecting the protected/ directory. If you not know how to do this, please ask your server administrator to password protect this directory for you. If you choose not to do this PLEASE remove this directory. manage.cgi is a script that you can use to manage your photo galleries. It is not secure enough to allow public access to it. Many accounts have a web interface that will allow you to do this. IF YOU CHOOSE TO LEAVE THE MANAGER.CGI ON YOUR SERVER, PLEASE DO SO AT YOUR OWN RISK AND MAKE SURE IT IS PASSWORD PROTECTED.
    5. Your done!
    Fire up your browser and point it at the index.cgi script. Good Luck! Email me if you use it!
    HOW TO USE

    Just point your browser at it

    e.g.- http://www.yoursite.com/cgi-bin/photo/index.cgi

    If you get an internal server error, run it from command line so that you can see what is going wrong. See my FAQ on my script page for more info.

    You may also use the web based administration (if installed) by pointing your browser at: http://www.yoursite.com/cgi-bin/photo/protected/manage.cgi

    CHANGES

    11.23.2000 Initial release.

    11.28.2000 Added commenting section and a few new settings in sitevariables.pl Added a few more images to site images. Fixed back button to work even after comments.

    11.28.2000 Fixed space in filename issue (hopefully) there were many bugs here to squash. Changed location of descriptions to descriptions/ sub directory under the album. This is more organized.

    11.29.200 MAJOR changes. Added manager.cgi in protected/ and all of its features Added shutterfly.com support. Added many new variables in sitevariables.pl Added wrapping if the number of albums goes over the albums per row variable.

    12.03.2000 fixed bug when reporting the height to shutterfly. fixed a few bugs and enhanced security in manage.cgi (I still think manage.cgi should be as proetected as you can make it in order to be safe)

    12.08.2000 Changed to version 1.4. Added prev/next links and thumbails for prev/next. Added width tag on preview images. Changed image to a border table with rows. Removed the exact timestamp from the images.

    12.19.2000 Changed to version 1.5. A few asthetic changes including a smaller date on each file in the album. Added check for empty directory name. Moved the directorycheck() sub to common.pl so that I could add it to the manage.cgi. manage.cgi now also creates thumbnails that were unavailable before. Added README.IMAGEMAGICK

    12.30.2000 Added a link to the index.cgi to the manage.cgi. Added maxWidth viewing option for visitors. Added a cookie to store the users viewing preference. Changed background color and updated corner pictures.

    1.10.2001 Major update to appearance. Added search.

    1.28.2001 Version 1.8 Added support for movies. Still need to fix comments for movies.

    5.27.2001 Version 1.9 Added email option for commenting. Fixed movie commenting.

    6.11.2001 Version 1.95 Fixed issue where pictures with caps extention (.JPG) would not show up.

    7.17.2001 Version 2.0 Added subfolder support. Also updated the manager to support subfolders. Changed the sorting of the folders. Using ping now to get the resolution of the images instead of having to open the image first (much faster).

    7.22.2001 Version 2.01 Fixed the picture size returned from the 5.3.6 version of image magcik when using the ping command. Added a new variable called $old_imagemagick to sitevariables to specify which image magick you have installed.7.22.2001

    8.2.2001 version 2.02. New images for folders, buttons, arrows, etc. Added comments to teh colors section of the setup to make it easier to see what you are changing. Made the text color variable actually work and change the color of the text in the menues.

    8.4.2001 version 2.5. Complete overhaul of the way the script works. Re-wrote the album display routine. Better support for any filetype. You can now register filetypes using the %filetype hash in the sitevariables.pl file. Also re-did the standard images used for buttons,logos, etc. Also a complete overhaul of the manager script! Added support for Image::Info to get the EXIF data stored by digital cameras.

    8.10.2001 version 2.6. Major security fix! Now it dies if someone puts .. in the album name they want to view! Fixed deleteing a picture to delete the picture and all different sizes of it (manage.cgi). Fixed problem with spaces in image names for older netscapes. Added alpha watermarking code.

    TODO
    I need to do/need help with the following items 1. disable right click to save with java script 2. overlay custom picture or text to each picture
    Send questions or comments to mike@fuzzymonkey.org Thanks, Mike Spice

    --Contact us-- --Search--

    Site hosted by the Software Workshop