RSS Feeds With Flickr & K214 Sep
I have implemented the Flickr RSS plugin for WordPress which surprisingly enough, works quite well as an SBM (Side Bar Module) with the K2 platform. It displays a nice RSS feed link, and the ability to display your photo-stream, with view options, or select sets that you want to be displayed. It has occurred to me that its important to keep administration overhead to an absolute minimum meaning that I do not want to have to much around with a lot of management control over my photo’s when I want them displayed properly with my site. Whew, ok so with that out of the way, and knowing that I needed to display a single set for my WordPress driven site, I needed to modify the Flickr RSS plugin to display my actual set instead of all of my photo-stream.
The short answer is that it worked beautifully. It polls what seems like on the hour for updates and refreshes my picture on my site. This is a small bit of functionality, but enough where I really wanted it to work well.
Now, here is where the problems started to creep in. I noticed that when I implement the SBM for flickr, using K2’s integrated module, the RSS feed was not linking properly. Long story short, I was able to figure out that it was only when using sets, that my sidebar feed was not outputting the correct RSS feed. It left it blank. After a lot of digging around, I picked up on the fact that the Flickr RSS plugin does not have the code required to handle RSS feeds for sets. Well, once I found the appropriate feed off of the flickr site, I set to work on making this alteration. Here are my changes to the flickr.php K2 module:
Line 10
$setid = stripslashes(get_option('flickrRSS_set'));
I added this line is using the code generated from the Flickr RSS plugin itself (line 25). You will also notice some similar configuration settings within the Flickr RSS plugin PHP file. You can ignore those for this modification as I prefer to use K2’s build in flickr SBM.
Line 19
elseif ($type == 'set' ) {
$rss_url = 'http://api.flickr.com/services/feeds/photoset.gne?set=' . $setid . '&nsid=' . $userid . '&lang=en-us';
}
You will need to add the above code AFTER the last }. This will add the correct URL information for the set RSS feed. This still keeps the plugin dynamic so that you are not required to manually override any settings with a static URL. Hopefully anyone implementing the Flickr RSS plugin with WordPress will find this information useful.

Leave a Reply