New (nerdy) hobby

So I did that thing with the Joomla and the database and all that, and now my new hobby is playing with wordpress widgets.

And by playing with I mean butchering, mangling and abusing the perfectly well thought out and implemented code and systems that my betters have left lying around to be ‘developed’.

Next up is the blogroll. Currently I’m using SBS Blogroll,  a nice wee widget that runs off and gets post titles and dates from the blogs I follow (via rss feeds), and sticks them up there to the left so I can see if anyone has posted something new recently.

Except it seems to fail on a couple of  feeds and on closer inspection I think I can do a better job.
Not better in a proper coding sense, Jaysus no, I mean I can hack together something that does the same job, dosn’t fail on any valid feeds but can’t cope at all with the unexpected, and may cause something to catch fire.

WordPress has a class called SimplePie that deals with RSS feeds and, theoretically, takes the pain out of dealing with them. In actuality it’s a massive cover-all-possible-situations yolk and dosn’t look at all painless to me.

Since there’s a perfectly good http request class (WP_http) and RSS feeds are pretty simple things (or Really Simple if you want to get all pedantic about it), then I should just request the feed, then take everything between the <channel> tags and chop out the couple of bits I want; title, post title and publish date.

Or is that too simple? Could doing this cause the internet to seize completely? Am I responsible enough to make this kind of decision?

I’ll brew some tea, the solution is always in tea. Or gin, sometimes.

This entry was posted in Uncategorized, php, web and tagged , , , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>