On the second (or third) day, he rested
Phew, 14 hours straight on Monday, the same yesterday but with a break to screen share with a client, and another 8 today. But that feels like it – a WordPress front end getting pictures galleries from a multi-user Coppermine picture library application. Shame it’s for a private site, but at least 4000 pairs of eyes will feast on the results!
The main challenge was that while there are all sorts of WordPress widgets that use Coppermine-sourced images, they all seemed pretty limited – gimmicks rather than the full set of web galleries that were needed. Modifying them was an option, but these porkers would need a barrel of lipstick and they’d still have a curly tail and leave a trail of crap behind them.
The breakthrough was finding cpmFetch. It’s a PHP library that queries Coppermine and fetches images and metadata such as titles and keywords. So rather than tarting up the Coppermine gallery itself with a theme – most seem pretty ugly anyway – you can generate your own HTML and then include that in WordPress, completely hiding Coppermine from prying eyes. One small problem was that cpmFetch’s default output is as HTML tables while I wanted a straight CSS design for FancyBox to display the images. Luckily there’s a parameter that switches the output to an array, through which your PHP can loop in any way you wish:
$objCpm->cpm_setReturnType("resultset"); //output an array
Over the years my encounters with Coppermine have been sporadic, so I was learning it and cpmFetch from scratch, and while cpmFetch’s documentation isn’t wonderful, I’ve done enough of this sort of PHP coding that I could figure everything out. And while it was an effort over two days, it was so nice writing in PHP rather than Lightroom’s horrid Lua.
The funniest thing was encountering the Coppermine user community in the project’s forum. If you think things become a bit sharp in Adobe’s Lightroom forum, or over in dpReview if you still bother with it…. The sticky topics give some idea. So “Sheer lazyness not to be tolerated” (apparently bad spelling is) is a rant that tells you to read the documentation, and many of the threads are ended by equally bad tempered responses. They are probably just fed up with idiots, but it’s actually worth reading if you ever want to see how not to make an open source project attractive.
As someone puts it at this other forum (I was looking for a Lightroom to Coppermine plug-in):
If I actually still thought Coppermine was any good, I’d probably even look into coding a [Lightroom] plugin myself, but the Coppermine gallery is outdated and under-maintained, and the community is run by a bunch of fascist dictators that don’t induce much positive community involvement.

Nils Jorgensen
Syncomatic’s original idea was to sync the metadata of files where their names are the same but they have different file types – for example, from 123.cr2 to 123.tif.




