I know
I promised the next thing would be a recoding to semantic markup and cleaning up the stylesheets, but I got carried away. So the front page of my blog now carries a sidebar showing photos I post thanks to
flickr.com.
This post is actually also being made from within flickr.com, blogging that first image to my main blog.
I did come across a small problem with the idea of a sidebar photoblog a in that it’s a bit tricky to get flickr to post to the blog in a nice format. The photoblog actually has its own MovableType blog associated with it (simply because I think this ultimately gives me more control and I like keeping everything in one place). The idea was I’d post photos to this blog and everything would end up in the main blog by some server side include magic (this is basically how the Links of the Moment section works too). The problem is that while flickr allows templates to be designed for posting to the blog, these only work when using the post to blog from within flickr, not when automatically posting emailed photos. In the latter case the post simply consists of a linked thumbnail image. This doesn’t make for pretty sidebar.
The solution to this problem was a little cunning. I already had Brad Choate’s
Regular Expressions Plugin installed for various reasons. That mean I could construct a find/replace regular expression to extract the link information from only the post body. Form there on it’s easy to construct what I wanted. The snippet of template code is given below in case anyone wants it (note that regular expressions tend to make my brain go furry so Perl gurus please don’t jump on me).
s/^(
<$MTEntryBody$><$MTEntryTitle$>
<$MTEntryBody$>
<$MTEntryDate format="%Y-%m-%d"$> <$MTEntryBody$>[About]
Anyway, it seems to be more or less working. I’ll post photos (hopefully of better quality of than the first which is actually a cropped screenshot of a poor avi) when the mood takes me.
There’s one more problem with the integration of posting photos direct to the main blog like this. That is it there is no support for catergories (though it’s said that their working on this at some point) so I still have to go into MT to fix that, which kind of defeats the point but hey, the photo sidebar isn’t affected so it’s something I can live with (though I suppose it’s also slightly annoying I can’t play around with extended entry and keywords without going to MT as well).
Edit: Oh, the meant to mention that the photo sideblog also has it’s own RSS and Atom feeds.
Edit 2: I was obviously half a sleep from a markup point of view when making these changes. Validity now fixed again :-)