SPGM – Simple Picture Gallery Manager

Filed under: review,web development — jaydublu @ 6:26 pm

My other half makes cakes, and like a good hubby I did her a website some time back – but like the old saying about cobblers children it should really be a bit more impressive than it is.

The main part is the gallery, and I started off with something I knocked up in an hour or so, but recently thought it needed some attention – didn’t look very good or work well, and was a nightmare to maintain.

So, the old quandary – do I start from scratch, search in vain for the perfect thing, or find something that’s close and adapt it (or put up with the failings)?

I went through a few gallery packages, and they either were to huge and clonky, or didn’t work (or I couldn’t be arsed to fiddle to make them work) or they had entirely the wrong feature set so I’d have to turn too much off. I didn’t want comments or other UGC / sharing / web 2.0 type features, I just wanted a nice simple way to display categorised groups of images with a little bit of description.

And since the images were being taken on a 6mp camera, and we didn’t want / need the full size image online, there should be an easy way to do the resizing / thumbnail generation etc.

And it should be light, and simple, and … nice.

I was just about to give up the search and write my own – I was thinking ftp images up into folders and have a very simple script that if it saw a new image would just display it, and if it found some meta-data in a text file or some such would disply that alongside. No need for databases or anything complex.

And then I found SPGM – and I found that someone had already written it. I’ve commented before on my love/hate with open source, but this is defintely on the love side. It’s just the thing, and almost exactly what I had in mind – in fact better because I didn’t have to write it.

So I install it, and it works first time, and I start thinking “OK, it’s great, but it could do with a basic tool to help with thumbnail creation and editing the meta-data” and then I read on and found that had been written too – SPGM Webministration – it was light and it worked first time and was just the thing. Two for two!

So I’ve knocked up a quick Firewoks macro to automate the process of generating 640×480 images to upload (don’t want to waste too much bandwidth by having the conversion done on the server) and 100 odd images are now online and looking funky(ish), in practically no time. And I start thinking “I wonder if there’s a tool to do that side of things too” and I check, and there is.

But I haven’t tried that one yet – no sense tempting fate.

Handling large file uploads in PHP

Filed under: review,tinkering — jaydublu @ 5:40 pm

I’ve been a bit lax with techy posts recently, so I thought I’d jot down some things I’ve been working on of late.

Playing with Flash Media Server and video encoding, but nothing conclusive to write about yet so watch this space.

What I have had some success with though is handling large file uploads in PHP. It’s something I’ve come across in the past that you soon hit upload_max_filesize or max_execution_time when making web apps to allow upload of files into the megabytes and the slippery slope that is increasing either or both php.ini setting in response to client requests and against better judgement.

In the past I used to set up ftp accounts and say ‘use a proper protocol to transfer files – duh!’ but that’s not exactly user friendly.

So last weekend I went on a hunt for a better solution, and particularly any client-side file upload tools – came across a few that were contenders, and finally settled on JUpload as an interim solution, saving having to code something from scratch.

I’ve previously blogged about my love/hate relationship with Open Source software – here’s one that goes down in my book as a goodie.

It took a bit of fiddling to get the demo code working – it helps if you check out the SVN head – the release package wasn’tquite working. It also took a bit of hunting to find the JUpload PHP class in the wiki which saved me a lot of time writing my own (and reinventing the wheel). It wasn’t handed on a plate how to get it working, but it also wasn’t too hard to figure out.

So I’ve got it breaking everything down into 1MB chunks, and uploads are a whole lot more reliable than just using one big fat HTTP file upload. Whether the applet will survive as is or be modified, or if I will develop something bespoke based perhaps on its core concepts only time will tell, but for now I’ve got bigger fish to tickle.

Open Source Software

Filed under: rants — jaydublu @ 7:55 pm

So while I’m waiting for my Gentoo kernel to compile, rather than drinking bourbon and folding paper (or browsing illicit web pages) let’s have a rant – after all, isn’t that what blogs are about?

I work for a fairly large ‘digital communications agency’ (new media in old-skool lingo) and we’re fortunate to have some fairly substantial budgets to work with, but that doesn’t mean life is easy.

My job, near the top of the food chain but in a technical capacity, is often to decide on a technical approach for particular projects. I hate re-inventing the wheel, and I’m lazy at heart, so if someone’s developed something that will do a job I’m more than happy to use or adapt it. (why do you think one of my categories is ‘tinkering’)

Today however, blessed with the fact that most of the Account Managers were out schmoozing clients and watching cricket test match, I spent most of the day perusing what’s available on the Open Source market for content management / blogs / community sites for a project with a ‘challenging’ budget.

My biggest challenge was figuring out what a particular package did, how it would make life easier, and what I’d have to do to demonstrate it to the decision makers. I had a fresh look at Joomla and WordPress which I’d played with before, and finally got round to finding out what Drupal and some of the wikis (MediaWiki in particular) offer.

The alternative is either to start from scratch with a bespoke application (possible, but have we the budget) or extend our own set of CMS tools that we’ve been developing in recent times.

Joomla! I know quite well because I use it to drive the Happisburgh Village Website and WordPress was considered to power this blog (still don’t know if I made the right call, but I do like this one so I’m sure I didn’t make the wrong one)

More later – I think I’m just getting warmed up…