Hackin’ on WordIdentica

I’ve been pretty happy with the WordPress plugin, WordIdentica. It is very simple but does exactly what I need, it sends new posts to Identi.ca as new status messages. The Twitter Tools plugin does a lot more than that, by contrast, for the Twitter service. I don’t use all those extra features, I am not a fan of having micro blog content pulled back into my main blog.

My only two complaints with WordIdentica are that it doesn’t handle quotes in post titles and that it doesn’t use ur1.ca, the complementary URL shortening server Identi.ca uses, that also just happens to be based on open source and the database for which you can download and reuse.

The first problem was trivial, adding a urlencode() around line 43 to make sure $title doesn’t clobber the post to Identi.ca.

The second was a bit thornier. TinyUrl has an API where you can make a GET call and get a simple text string back that is the shortened URL. This makes calling it from a script very simple. I asked Evan about adding the same to ur1.ca and he said it is coming. Before I could think about it any further, Zach sent me this code which let me just insert the function and call it where the posts permalink was being pulled and passed to TinyUrl.

This post, then, is the test of both changes, so here’s hoping that my Identi.ca timeline updates or I may have to post a few more annoying tests.

Update: I should have configured Twitter Tools to not post while I was trying to debug these changes. If you saw 404s clicking on links from my Twitter stream, sorry. Minus this update, this is the post linked. I just deleted the other copies so as to not clutter up my blog.

Leave a Reply

Your email address will not be published. Required fields are marked *