Grabbing Coppermine stats

With 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();

About

Senior Content Development for Microsoft writing about Azure virtual machines. Occasionally I play video games.

Posted in blogging, coppermine, photos + galleries

Leave a Reply

Your email address will not be published. Required fields are marked *

*

About Me

Iain Foulds, 33 years old. Originally from England, now living in Seattle. I currently work as a Senior Content Developer for Microsoft writing about Azure VMs. Gamer. Very passionate about photography. Comments and opinions expressed here are my own. More...

Categories

Archives