Creating a photoblog with WordPress

While I updated shutterclicks to the new layout I switched it over to WordPress from Pixelpost. While Pixelpost wasn’t exactly unsuitable for what I wanted, its comment handling and generally very ugly codebase had me going nuts whenever I needed to do any maintenance on the site.

I’m now using a very bare bones install of WordPress with the Yet-Another-PhotoBlog plugin. And SpamKarma for spam filtering (which works much better than Akismet in my experience). I’ll probably look into other plugins to use on shutterclicks as well once I get all of the Pixelpost content moved over to WordPress. I used the import script from Shifting Pixel to do the base work.

However, it had problems in importing the images and embedding them in the correct post so I need to do some manual work as well. Which is to the better, since I’d need to fiddle around with the images to get them working with YAPB anyhow.

While YAPB has all of the documentation needed to get it going, it still needs some thought before it is fully functional. Unless of course you let it do all the necessary code injection of the pictures (which I naturally don’t). For example, there’s no template tag to insert the picture itself without any thumbnailing so you have to use some code for it. The following does the trick well enough:

Also, the EXIF output is quite horrible and needs formatting to be more readable. Well, that’s all IMHO ;). But I’ve never liked to see EXIF data displayed as it is on many websites in the very mathematic way (with lots of precision in the numbers etc). Rather I like to see it similar to the camera display (and how Lightroom shows it). So I wrote the following code to customize the EXIF output:

	if ($exif = ExifUtils::getExifData($post->image)) {
		echo '
    '; if (!empty($exif['model'])) { echo '
  • ' . $exif['model'] . '
  • '; } if (!empty($exif['exposureTime'])) { $time = $exif['exposureTime']; $i = strpos($time, '('); $j = strpos($time, ')', $i); $time = substr($time, $i + 1, $j - $i - 1); $t = explode('/', $time, 2); if (empty($t[1])) echo "
  • $time s
  • "; elseif ($t[1] == 1) echo "
  • $t[0] s
  • "; else echo '
  • ' . $t[0] . '/' . $t[1] . " s
  • "; } if (!empty($exif['fnumber'])) { echo '
  • ' . $exif['fnumber'] . '
  • '; } if (!empty($exif['isoEquiv'])) echo '
  • ISO ' . $exif['isoEquiv'] . '
  • '; if (!empty($exif['exposureBias'])) { $ev = $exif['exposureBias']; $i = strpos($ev, '('); $j = strpos($ev, ')', $i); $ev = substr($ev, $i + 1, $j - $i - 1); $ev = explode('/', $ev, 2); if ($ev[0] == 0) $ev = '0'; elseif ($ev[1] >= 10) $ev = $ev[0]/10 . '/' . $ev[1]/10; else $ev = $ev[0] . '/' . $ev[1]; echo "
  • $ev EV
  • "; } if (!empty($exif['focalLength'])) { $mm = $exif['focalLength']; $i = strpos($mm, ' '); $mm = substr($mm, 0, $i); $mm = round($mm, 0); echo "
  • $mm mm
  • "; } if (!empty($exif['flashUsed'])) echo '
  • Flash: ' . $exif['flashUsed'] . '
  • '; echo '
'; }

That code still needs some work, I’m not satisfied with how the exposure bias is displayed (3/3 when I’d like +1 in those cases). But at least it’s a step in the right direction.

Randomfire updated

I finally got around to changing the layout of the site. Anna designed the holy trinity layout for all three of my blogs (randomfire, randomfire: shutterclicks, and Satunnaisia leiskahduksia) some time ago. Now two of the three have been switched over to the new layout and the latest version of WordPress.

There’s still some work I need to do with the current theme: at least archives, new URL structures, etc. I chose to implement a fairly clean site without dependencies on other sites. The never published version 3 was supposed to have hooks to various other sites that I’ve now simply linked to in the sidebar. I’ve noticed that blogs that include pictures from Flickr streams and content from various sources can be annoyingly slow to load. And since content should be king in blogs I decided just to link to the other resources.

The only exception to what I said above is the inclusion of the latest Life of Jalo image in sidebar, but since it’s on the same server as this blog, there shouldn’t be any noticeable delay in generating the page (and the heavy lifting is done server-side).

The new layout hasn’t been reliably tested on IE6 since I suspect my install of Multiple IEs to be borked somehow. IE7 has some minor issues that I won’t be worrying about and I’ll get around to checking the site in IE6 at some point of time.

Hopefully now that I have a design that I can stand to look at I’ll start writing more here. My lack of writing hasn’t been due to a lack of ideas.

Dropping RSS support

Now that Bloglines finally supports Atom 1.0 I’ll be dropping RSS (0.9x, 1.0, 2.0) support when I finally get the new layout for randomfire ready. I’ll also change WordPress to output Atom 1.0 instead of Atom 0.3.

If I happen to have a reader whose feedreader doesn’t support Atom 1.0, please let me know and I’ll delay dropping RSS support.

The Life of Jalo updated

To honour the upcoming first birthday of Jalo we created a new layout for his photoblog. The layout is a shift away from the darker and heavier look and Anna certainly had fun creating the banner at the top. Below are screenshots of the old and new layouts.

Old layout
New layout

In the more geeky news, the Atom feed of the photoblog was updated to conform to the new Atom 1.0 specification (even if it isn’t approved yet). In getting the feed to validate Niels Lenheer’s listing of changes between 1.0 and 0.3 would have been helpful. Well, reading the spec works just as well though.

Jermut v2

Earlier I lied a bit. Although the final report of an EU project did stifle my creativity. A sudden burst of something (genius ?) finally allowed me to come up with a site design for Anna’s comic that I was satisfied with.

So, coupled with the redrawn strips we present Jermut. A comic filled with the lives and escapades of Finnish firefighters and paramedics at a small rural fire station. Currently the comic is in Finnish only, but we’re planning on translating it into English sometime. Naturally requests may make the day that translations appear on come sooner.