Friendfeed is a one great service which I’m using from few days/weeks. So, I thought, I will publish my friendfeed on this blog. Well, as usual, I’ve some of my own requirements. Requirement is that I dont want to show it on my sidebar, but I want to dedicate a page for it. So, I need to take json/xml/rss/atom from friendfeed and create html out of it. Obvious is that I’ve to either write a JS to parse it client side or PHP script to parse it server side. PHP was my choice and I needed an option to exec php on single page. There was on plugin named phpexec, but, I wasn’t very comfortable (call it being paranoid) for using that plugin.

So, I used a small work around. I created a page feed.php and added

/*

Template Name: My Friendfeed

*/

Now, my wordpress thinks that its a template and gives me an option of choosing template while creating pages. I created a page but without any content. I wrote all my php logic in feed.php and now wordpress parses the template and gives me required output. Anyway, you can download the code here. You’ve to extract the contents to your theme folder. Btw, You can see it working here.

Well, its a hackjob. It works (only) for me. If you want to do same, you’ve to edit the code according to your needs. It could have been done far more easily, but my stupid host has php4 and I missed many features. And, I’ve had something else in mind (I thought to publish friendfeed I follow, ie., all friends’ feeds) but later changed mind. By the way, if you don’t know what’s friendfeed, it is an aggregator of all 2.0ish services you might be using in a small definition. Check it if you want to know more, you wont be disappointed.

PS: There is absolutely no reason why I haven’t blogged for more than a month. I wasn’t busy. Its just that nothing had happened in my life to blog. Absolutely nothing. Uhmm, wait, I’ve been to Coorg on an adventure trip. Nothing more than that.

Filed ↓ FriendFeedTechTips