It’s less than a year since I wrote about how much I like Gallery. That’s still true, and I’m still running a couple of instances of it, but it’s now gone from this site. In the last year, Gallery has undergone a complete rewrite, with the new 3.0 in beta at the time of writing. In some ways, the rewrite seems like a good thing. It’s fair to say that 2.x was pretty bloated, and definitely ‘legacy code’. The new version is stripped down in many ways, PHP5 only, and built on top of the Kahona framework, making for a much cleaner codebase.
On the other hand, it’s been a long time coming and still isn’t ready, and in the meantime 2.x has been at a standstill. More importantly for me, WPG2, which provided the integration with Wordpress has long since been abandoned from a development perspective – even when I first started using it, I had to make quite a few fixes with nowhere to submit them back to. There’s not even sign of a WPG3 on the horizon either, as far as I can tell. It doesn’t look like a difficult task to integrate the two, but there isn’t a lot of documentation for 3.x yet, and I don’t really have the time or appetite to start digging into it.
So, I decided to give Zenphoto a trial run, mainly based on Mark’s recommendation. I liked what I saw, and the conversion and integration looked fairly easy, so I decided to make the switch.
A couple of points about the conversion:
- The ‘albums’ directory from the old G2 setup can just be copied into the zen directory. Zen picks up all the albums and images from the filesystem automatically.
- Metadata (titles, descriptions and the like) can be converted. I found a couple of conversion scripts that would have worked, but I’d have had to tinker with them slightly. In the end I didn’t bother – I’m fixing them up manually as time goes on. Frankly my descriptions were and always will be crap, so it wasn’t worth the effort.
Integration is mainly handled by ZenphotoPress – a nice Wordpress plugin that provides the ability to easily embed gallery images into posts, and gives me the silly (but I like it) random image in the sidebar widget. These things are done in almost exactly the same way as WPG2, so conversion was easy, the only pain being having to change the embedded images in existing posts.
WPG2 does various other things that ZenphotoPress doesn’t. One is single sign-on, which I haven’t bothered with (at least for now), although there are Zenphoto plugins for it. The other thing WPG2 did was integrate the visual side of things. I had to do this manually, by building a new Zenphoto theme that integrates itself into the Wordpress template system (this post covers the basic principles well) and then restyling the Zenphoto stuff to fit in with the Tarski theme I’m using for Wordpress. Not difficult if you like fiddling around with CSS, which I don’t, but I gritted my teeth and did it anyway.
There are a few more things I’d like to do to complete the setup, but it’s reached “that’ll do” stage and I wouldn’t be surprised if it stays that way for quite a while. So, feel free to check out the new Zenphoto-based gallery, via the link at the top of the page (assuming your reading this ‘here’). It’s not very exciting but as you’ve read all the way to the end of this, I’m guessing you’re easily amused and not short of time.

1 comment
Comments feed for this article
Trackback link: http://ciarang.com/posts/from-gallery2-to-zenphoto/trackback