Blogger Hacks, Categories, Tips & Tricks

Wednesday, August 09, 2006
Dynamic Related Posts Service
Serial hacker Ramani (from Hackosphere) has released another ingenious feature for the blogging public: related posts from the blogosphere.

You just drop a bit of code into the footer (or elsewhere) of your posts, and it picks up the permalink URL and sends it off to Ramani's magical PHP server. There, the URL is stripped back to a few keywords from your post title which are then run through Google's Blogsearch. The results are parsed and displayed nicely on your page.

Once neat feature is that you can just grab the invoking URL and append any of your own permalinks to it to see what the service returns. This openness means that I'm sure we'll see tool this cropping up in a range of other hacks.

On the plus side, the lack of use of tags (relying only on title keywords) means that it's robust and will work on just about anything. You also get back an eclectic mix of posts that you might not otherwise associate with your original post.

On the down side, the lack of use of tags means that it regularly turns up a whole bunch of unrelated content. Also, there's no way (that I can see) of tweaking the layout, in terms of what gets displayed, how much, style info and so.

If you tend to write lengthy and specific titles for your posts and want to constantly delight your readers with novelty, this would make a great addition to your blog!

If you'd like to test out the service on a few of your pages, here's a javascript bookmarklet to try out. Just create a temporary bookmark, then swap in the new code (below) into the URL field. Then drag the bookmark onto your toolbar. Visit the pages of interest, click the button, and you'll see which related posts from the blogosphere the systems returns.

javascript: window.location.href = '' + window.location.href;

Filed In:
Posted at 6:41 AM by Greg.
<    >
Blogger Ramani said...
Thanks for introducing my hack, Greg. I will try to tweak my search operation to get relevant posts only. But a certain level of dumbness is unavoidable, I guess.

I like your bookmarklet idea very much. But I believe javascript in bookmarks works only in firefox, isn't it? IE users could use the demo page at

Also, for firefox, i have created a bookmarklet.php which you could use instead of relatedposts.php to avoid javascript showing up along with results.

<    >
Blogger Greg said...
No worries, Ramani.

I've updated the bookmarklet code above to use this page - very nice. Works in IE too, though I believe they're called "favouritlets". :-)

Oh - during testing I noticed a couple of &amp; showing up in post titles ... hardly a big deal, but may be worth checking out?

<    >
Blogger Ramani said...
Greg, Just sometime back I found that bookmarklets can be added to the links bar in IE. By adding this bookmarklet to your browser, you can get related posts for any blog that you visit (including yours)!!

Btw, I have tweaked the search operation and it shows better results now. I will update the results page for aesthetics and remove any wierd things like & etc. Please continue to give me any suggestions to make this better.

<    >
Blogger ycc2106 said...
Lots of cool hacks lately here. :)

Note: I've added the Dynamicrelated post to Popmarks, I'm actualy testing it with my blog.

<    >
Blogger Ramani said...
This comment has been removed by a blog administrator.

<    >
Blogger Ramani said...
Greg, Few people had expressed interest in finding related posts from their blog instead of the entire Blogosphere. So, I have come up with another version, details of which are here. It will bring out only the relevant posts using the "search in title" operation.

Links to this post:

Create a Link

eXTReMe Tracker