Grabbing Coppermine stats
Wednesday 1st February, 2006 | 1:46 pmWith the photo gallery up and running, I was after a way of grabbing basic stats from Coppermine and integrating this alongside the blog stats. Coppermine has some quite nice stats built into, and I was keen to simply get a quick photo + album count. Unless I’m missing something obvious, there doesn’t seem to be a a simple way of getting this out of the database. In the end, cpmFetch seemed like a straight-forward way of doing it, short of writing my own SQL queries, and although I’m not likely to use the ability to grab photos straight from the gallery, at least the functionality is there.
For anyone looking at getting basic stats from Coppermine, simply adjust the location of your cpmFetch install, and customise the formatting of the output:
require_once "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_formatStats('Gallery: %f photos in %a albums');
$objCpm->cpm_close();
Posting your comment...
Iain Foulds, 25 years old. Originally from England, now living in Bethel, Alaska where I work as a systems analyst for the school district. I've been involved in a number of open source projects for many years and used to produce two major music podcasts.