Jeremy Smith's blog

Entry Is Labelled

Flickr Integration at the Demo Blog

Over on the Demo Blog, I have some rudimentary Flickr integration happening. Unfortunately, it is of the suboptimal kind.

The Flickr Photosets plugin did not really work how I intended it to work. I expected it to go out to Flickr, find the most recent n photos posted, and display them on the blog. It did not do that. It behaves differently.

The plugin goes out to Flickr and iterates through your "photo sets," which are like albums e.g. you organize your uploaded pictures into albums on pictures; by default, an uploaded photo has no "album" that it is associated with. So, my first pass through (not knowing about this "photo set/album" concept, I uploaded some random photos, installed and configured the Flickr plugin, pointed it at the page, rebuilt the DemoBlog site and Voila!... nothing.

Rebuilt the site again...


So, I began to dig into the code. I finally saw the method calls to Flickr's web services API and saw that they were not grabbing "photos" but was grabbing "photo sets." That's when I decided to go and actually read the documentation for the Flickr plugin module. And, yes, it's true. The plugin goes out to Flickr, iterates through your photo sets, and displays one photo per set.

But, that's not what I wanted. I just wanted to display the most recent n photos uploaded. Luckily, Flickr has another API via RSS. So, through a variation of the technique described in How to Create a LinkBlog with, I used the MTRSSFeed plugin to access the photos.

It did not work too badly, but each photo gets accompanied with the text "Case ITS posted a photo"; and I don't really care for that.

Maybe over the weekend I'll hack on the Flickr Photosets plugin and add my desired functionality to it.