Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register

  Tuesday, April 13, 2004 

Technorati trackbacks

BoingBoing's other blogs commenting on this post feature, added yesterday, has provoked a flurry of responses. Co-incidentally, I had just made myself a Technorati Trackback bookmarklet: drag this link -- TT -- to your toolbar, then click while visiting a blog article to see Technorati's roundup of posts commenting on the article.

As Cory Doctorow mentioned in an email I was cc'd on, the "other blogs commenting" feature ideally should display the count of inbound links, or, in case there are none, vanish. Here's a picture of a trial implementation:

There are two moving parts. First, a service that asks Technorati for the count, and returns some JavaScript. Here's the guts of my trial implementation:

tsearch = 'http://www.technorati.com/cosmos/search.html'
tpage = urllib.urlopen(tsearch + '?url=' + url).read()
m = re.search ('from <span class="greentext">(d+)</span>',tpage)
count = int (m.group(1))
return """
document.write('Technorati comments: 
<a href="http://www.technorati.com/cosmos/search.html?url=%s">%d</a>')
""" % (url, count)

Second, a template modification to call this service for each published item, passing the permalink of the item, and including the results in a <script> tag.

This is the classic pattern for pages that are dynamically generated but statically served, as is true for most blogs. You make client-side JavaScript add up-to-the-minute information at page-load time.

Although I can host the service that queries Technorati, I'd rather not, and in any case most bloggers can't. So I've disabled the feature for now, but I'd love to see Technorati offer a callable counter.

 


Recent Entries


















































Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist