Gallery Script

Originally, the script simply recursed through a given directory and its subdirectories, generating directory listings and thumbnails.

Managing these images and their associated information became a pain, so as of December, 2005, the gallery is completely database-driven.


Image management interface


The change to a database-driven model has afforded me the ability to more easily manage photos through a web-based interface, shown above, and from anywhere with web access. The transition has also simplified sorting, making sorting by date or name trivially easily.

Along with the database change, I've also implemented thumbnail caching, which I should've included in the first place. This reduces the load on the server, and spits out a pregenerated thumbnail for a picture, only regenerating thumbnails if needed, i.e. for new or modified pictures.

I've also implemented some mod_rewrite rules to prettify the URLs churned out by the script.
 

 
627196 hits