Plogger beta 3 Installation Tweaks
Posted in PHP on September 27th, 2009 by Allison Wong – Be the first to comment
I just installed the Plogger application for one of my clients, and, as with most apps, had to make a few tweaks in order to get it working. Plogger is a very basic open source PHP photo gallery. If you need something with more functionality, I would suggest checking out the slew of other PHP Photo Galleries out there such as Gallery. The reason I chose Plogger was its sheer simplicity for integrating the photo gallery into your website. It is truly a “drop-in” app that requires only 3 PHP statements on your page. The thumbnails, bread crumb nav, search bar, etc flows to fill any container width you have set. No editing of PHP include files or complicated themes. However, I did struggle with 2 issues:
Issue #1: Clicking the image to bring up the actual enlarged image resulted in a 404 error. The directory path was messed up. Here’s how I fixed it:
Open ‘plog-functions.php’ and find the following code:
global $config;
return (!empty($config[‘allow_fullpic’])) ? $config["baseurl"].‘images/’.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
}
and change it to read:
global $config;
return (!empty($config[‘allow_fullpic’])) ? $config["gallery_url"].‘images/’.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
}
Issue #2: This is not really an issue, but a tweak. By default, the Plogger will display your Collection first, and then force the user to drill-down to see the albums contained in that Collection. This is fine if you have many collections, but if you only have 1 collection, then it doesn’t make sense to force the user to drill-down to the album level. To show the albums for a specific collection, make the following change:
Open ‘index.php’ or whichever page you are calling the Plogger from, and replace the third PHP “drop-in” statement with the following code. The Plogger-ID is the ID of the Collection you want to show the albums from.
if(!isset($_REQUEST[‘level’])){
$GLOBALS[‘plogger_level’] = "collection";
$GLOBALS[‘plogger_id’] = "2";
}
the_gallery(); ?>
Final note: The instructions do not explicitly state this, but the 3 PHP drop-in statements need to be added to a page with the .php extension.
Here is the Plogger Gallery that I made in action.