John Dyer

Technology and web development in curly bracket languages {Javascript, C#, ActionScript}

Show Commenter's Latest Post: BlogEngine.NET Extension

by John Dyer 23. July 2008 03:11

Background

Over the past few weeks, I've seen a few WordPress blogs that pull in the last post from a commenter's website. I also saw a post from Mads about how to find semantic links on a webpage.

So, I mashed his code together with some code from the BlogRoll control and created an extension that goes out and looks for RSS feeds at the commenter's website and then pulls in the latest post. [side note: I wish I could say, "a half hour later ... ", but it actually took me a while to get it to work...]

It all happens asynchronously, so if you comment on this post, it'll take a few seconds for it to show up. Then it will keep checking every so often for new posts.

Example

Last year, I posted a JavaScript color picker and the post now has over 100 comments. Here's what it looks like with the extension running:

 Comments with Recent Posts

Download & Installation

  • Download Commenter's Latest Post Extension
  • The last post is wrapped in the following class so you can style it:
    <span class="commenterslastpost"></span>
  • Sometimes the ResolveLinks extension interferes with this, so you might want to add the following code around the foreach loop:
    if (e.Body.IndexOf("href=\"" + match.Value + "\"") == -1) { ... }

Add a comment to this post to see it in action...

Comments

7/25/2008 6:33:01 PM # Al Nyveldt Al Nyveldt United States | Reply
Sounds cool.  I've never seen a blog do that before, but it is a neat idea.
2/22/2009 3:48:46 AM # Craig Craig United Kingdom | Reply
Nice idea. I really want this extension
2/22/2009 3:49:27 AM # Craig Craig United Kingdom | Reply
Opps forgot to add my blog to test it Smile

Second time lucky.
3/14/2009 7:32:08 AM # Pankaj Pankaj United States | Reply
Good one...thanks for sharing..i will integrate in my blog too..
3/23/2009 6:46:02 PM # tim tim United Kingdom | Reply
Wow this is a really cool idea. I love it. Good work.
3/25/2009 8:49:06 PM # tim tim United Kingdom | Reply
Think I'm gonna start using this soon. By the way Jon, can you please add a tag cloud to your blog. Would really help navigation.
6/24/2010 11:15:47 AM # cv2impress cv2impress | Reply
its cool idea. i want its extension.
8/12/2010 10:18:44 AM # Replica Watche Replica Watche People's Republic of China | Reply
Our shop offers many famous Chopard Replica Watches. for example:Chopard Mille Miglia Replica Watches,Chopard Grand Prix de Monaco Historique 2008 Chronograph, They are all wrist watches and you can buy one for your father to show your love ,moreover. no one could know it a replica one.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Web Statistics