Aug 06, 2007
Bitten by the Twitterbug...
It was just a matter of time, wasn't it...
Ok, I too, have finally succumbed to the 'twitterbug' and have created my own account (the id 'tomster' was taken already, guess I really was too late for that one...)
To complete my conversion I've created a quick-and-dirty portlet that display my latest entries... uhm... 'twitters'... Just create a 'Page Template' named 'portlet_twitter' in your 'plone_skin/custom' folder and paste this into the ZMI:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" i18n:domain="plone">
<body>
<dl metal:define-macro="portlet" class="portlet" id="twitter_div">
<dt class="portletHeader"><a class="twitter-title" href="http://twitter.com/TWITTERID/">Twitter updates</a></dt>
<dd class="portletItem">
<ul style="margin-left: 0; list-style-type: none; list-style-image: none;" id="twitter_update_list"></ul><script type="text/javascript" src="http://twitter.com/javascripts/blogger.js">
</script> <script text="text/javascript" src="http://twitter.com/statuses/user_timeline/TWITTERID.json?callback=twitterCallback2&count=5" type="text/javascript">
</script>
</dd>
</dl>
</body>
</html>
You will (obviously) need to replace TWITTERID with your actual twitter id, of course. You can then refer to it with the expression 'here/portlet_twitter/macros/portlet' in the root properties of your site. This will work up to Plone 2.5.x.
A nice side effect of it using Javascript is that I won't even have to touch my caching setup in order to have live updates on my site.
I'll see where this will take me. I'm viewing it primarily as lowering the threshold to posting tiny little bits that I find interesting. (So expect lots of stuff around Python, Zope and Plone...)
