Michael Cottam's Photo Galleries

Installation Instructions for the Photo Gallery Software

Components



This photo gallery system uses SLIR (Smart Lencioni Image Resizer, by Joe Lencioni) to compress and resize images on-the-fly (and cache them, too). It uses the exif_read_data() PHP function to pull lat/long coordinates out of images, and then uses the Google Maps Javascript API v3.0 to display a map with pushpins for where the images were taken.

A Quick Overview



Read this part first: it'll give you a good overall picture of how all the bits go together. And when you're trying to figure out how to tweak something, it'll help you figure out where to look.

Installation Steps



Let's call this step 0: it's the most important. BACK UP YOUR EXISTING SITE. Some .htaccess changes are needed to get this all to work, and as we all (probably) know from painful experience, .htaccess is a grenade, just sitting there waiting for one errant statement to blow up your entire site.

  1. unzip the file I've sent you that has the code into your root folder
  2. edit the header and footer inc files until managegalleries.php looks like the rest of your site
  3. in MySQL:
    • create new database "vipg" (shared server: might be named something like [hostusername]_vipg)
    • create new user for that database "vipgusr" (shared server: might be named something like [hostusername]_vipgusr)
    • add user vipgusr to the new database vipg, with all privileges
    • create tables "gallery" and "photo" using the scripts from the vipg/database folder (probably will need to remove 'vipg'. in scripts)
  4. in globals.php:
    • update the login and password for the admin of the galleries (this is what you log in with on managegalleries.php)
    • update the database connection settings
    • check gallery width setting
  5. if you get "cannot create symlink" error from SLIR, look at this: http://code.google.com/p/smart-lencioni-image-resizer/issues/detail?id=41
  6. note that the .htaccess file in the root folder MUST contain index.php as one of the default documents
  7. make sure your RewriteRule in .htaccess is working
  8. when you're testing/debugging the SLIR installation, start with trying to just show one of your thumbnails on a new page by itself
  9. SLIR should be writing an error log if it has troubles...look there
  10. SLIR configuration settings that you might need to mess with are in /slir/slirconfigdefaults.class.php ($documentRoot is one I often need to override)