YaK:: Building a Gallery [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   

Building a Gallery

My current side project has been to create a replacement for my old python gallery scripts that have grown a little stale and are hard to modify. I decided to use PHP since my server is optimized to serve it as fast-cgi, PHP is deployed on more web servers than python, and I wanted to learn PHP.


Architectural Requirements:

Current Features:

Right now my new gallery is good enough to replace my old python script; it currently does everything the python script does, but is better in some areas and the code is much more readable and modifiable. My plans for the future of the project is to build a client side viewer with the Google Web Toolkit (gwt) and use the PHP script to handle the remote procedure calls (rpc) by the gwt client. I'm hoping to gain more freedom in my layout in this manor, and a little boost in speed as the client does some of the processing. I also want to build a way for viewers to post comments on pictures in the gallery, and administrative tools to handle them as well as a way to add info to a picture like who took the picture, where it was taken, a little note about the picture, etc.

A current deployed version of my php gallery is here: http://mrwerewolf.com/Gallery.php


  • Gallery.php
  • style.css

    If you want to setup your own gallery, download the snapshot and upload it to your server where your normally put your pages. Make sure you meet all the dependency requirements described above. If you do not have the dependencies and you are the administrator of your server, then here is how you install them.

    For Fedora Core do the following:

    FedoraCore: sudo yum install php php-pear ImageMagick
    FedoraCore: sudo pear install Cache_Lite

    note: make sure you type in ImageMagick, as it is case sensitive.

    For Ubuntu do the following:

    Ubuntu: sudo apt-get install php5 php-pear php-cache-lite imagemagick

    To setup your web server with PHP, refer to the documentation specific to the web server that you are using.

    After you have all the dependencies, all you have to do is create two folders. From the directory where you placed Gallery.php, create a folder named "Gallery" (case sensitive) and a folder named "tmp". Then change the properties of the "tmp" folder to allow anyone to write to it.

    On the command line:

    any: mkdir Gallery
    any: mkdir tmp
    any: chmod 777 tmp

    That should be it. Now all you have to do is add pictures to the "Gallery" folder and then point your browser to the "Gallery.php" script.

  • (unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
    (last modified 2007-04-03)       [Login]
    (No back references.)