
While Blogger doesn't encourage comments and communities, it's still interesting to see who comments on your blog more frequently. This information can be obtained from
Blogger's comment feeds, but you need a tool for processing feeds.
Yahoo Pipes is probably the best way to combine, sort, filter and modify feeds. Inspired by
this Yahoo Pipe, I created
a pipe that shows the top 50 commentators from a Blogger blog, based on the most recent 5,000 comments. You can enter the URL of your blog and the number of top commentators, but the list is not generated instantaneously since Yahoo Pipe must fetch and process at most 10 GData feeds (
Blogger's API doesn't include more than 500 comments in a single feed).
The pipe could also be used to add the list of top commentators to the blog, using the JSON code generated by Yahoo.
Depending on the number of comments from your blog, the list may not be very meaningful. For example, if your posts get an average of 500 comments, this list will only reflect the hierarchy for the last 10 posts. To see the total number of comments from your blog, open this feed:
http://BLOGNAME.blogspot.com/feeds/comments/default (replace BLOGNAME with the proper subdomain), view the page's source and search for "openSearch:totalResults". Google Operating System has 15,217 comments and the most recent 5,000 comments corresponding to the last 5 months.
Update. Here's some JavaScript code that uses Yahoo's JSON output. This could be easily added in a HTML/JavaScript page element from Blogger.
<script type="text/javascript">
function pipeCallback(obj) {
document.write("<ol>");
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write("</ol>");
}
</script>
<script src= "http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&
_id=c92ac21897d8b56e61cfa85930dd89a1&url=http%3A%2F%2FBLOGNAME.blogspot.com&num=10" type="text/javascript"></script>
(merge the last two lines and replace BLOGNAME with your blog's subdomain name).
Labels: Blogger, Tips, Yahoo Pipes
DarkUFO said on March 4, 2008 5:30 AM PDT:
Ah this is brilliant!
Thank you very much.
Brandon said on March 4, 2008 5:55 AM PDT:
This is terrific. Thank you.
Dav7 said on March 4, 2008 6:07 AM PDT:
I will use it on mine!!
One way to use is that grab the RSS feed's URL (More options > Get as RSS) and it as a new page element in Blogger. I'm not sure if it works well, but it's worth a try.
Tonino said on March 4, 2008 6:43 AM PDT:
Is there any way to remove myself as a top commentator? That would be the icing on the cake.
KenBW2 said on March 4, 2008 7:13 AM PDT:
Woooooo! 4th in the list! :D
Cool. I second Tonino's request, maybe you can check the author-name field in the RSS to avoid showing the blog owner too?
Come to think of, is it possible to grab the first Yahoo result for every name (using Yahoo's RSS feed output for search result) and then link every name?
Mungo said on March 4, 2008 8:12 AM PDT:
Brilliant!
I've just implemented it on my blog, a nice addition, makes it feel more like a 'community'. Thanks for this addition. I've added your blog to my Reader - love it!
Cheers,
Mungo Says Bah!
iLoco said on March 4, 2008 8:28 AM PDT:
hi i'm a italian designer, the your blog is more good but the theme isn't web2.0 style...I would make a new gratis theme for you. if you want it please contact me at magix159@hotmail.it
Peregrino said on March 4, 2008 11:51 AM PDT:
Yay! I'm there too :D!!
Nice.. pipe(?) ! This yahoo pipes thing... I'll have to play a little with it because it seems interesting ;)
I removed Anonymous from the list and added an option to filter a name (for example, the author's name).
Michael said on March 4, 2008 12:53 PM PDT:
This is pretty cool. Although I think blogger should integrate stuff like this.
... or rather, instead of linking to the Yahoo top result, you could link to a Google "feeling lucky" result...
http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=something
As I only have a single link, I decided to use it for something more useful: list the posts that contain comments written by each person. It would be nice to actually list the comments, but Google's snippets show a small preview.
Tonino said on March 5, 2008 1:36 AM PDT:
Now I can filter my name and Anomymous. Thanks Ionut!
I put in in my blog :-D
One suggestion, maybe you can add a checkbox if someone want to list the anonymous commentators. I don't, but someone might.
I tested with my own blog. The result did not show author posts. So I think the result is quite good.
If the author made comments in his/her own blog, I think the result should reflect that, rather than hide.
Tonino said on March 7, 2008 8:12 AM PDT:
I found a bug, but I'm not sure whether it can ve solved.
I got a new comment in my blog and although the commenter wasn't the top one it appeared as the first with 7 comments and the second with 25 comments.
If I rerun the pipe it works fine again, but noone can do that for each new comment :_(
There's a problem with Yahoo Pipe's feed: it creates items with new GUIDs when it's updated and Google thinks the items are new. A better idea would be to use the JSON/JavaScript output, so I'll try to write some code.
I added an update to the post with an example JavaScript code that uses this pipe.
J said on March 7, 2008 7:57 PM PDT:
Your use of "commentator" is a misnomer; you mean "commenter."
Mungo said on March 8, 2008 3:37 AM PDT:
I believe that you are both right, sort of.
The modern term is indeed a 'commentator': One who writes or delivers a commentary or commentaries.
The 1913 Webster dictionary presents the term 'commenter'. One who makes or writes comments; a commentator; an annotator.
Look at it this way - when you are commenting on a blog post dated circa 1913, you are a commenter. When commenting on posts composed beyond the close of World War 1, please consider yourself to be a commentator.
By the way, I really liked this implementation (Yahoo Pipes). I used it and then took it down again... in a strange way I felt as though it made public the somewhat private comments my commentators/commenters were making. I know they're not really private, but I only have a few people commenting and I guess in a way I didn't want to draw everyone's attention to the fact that these folks are commenting. I guess it's hard for me to explain why... but subtlety aside, I've been poking around for similar Pipes widgets, and having a fun time with it! Thanks!
Cheers,
Mungo
Just a tip: don't clone the pipe just to change the URL. It's completely unnecessary since you can change the URL when you run the pipe. Clone the pipe only if you want to change how it works.
Jie said on March 18, 2008 2:28 AM PDT:
Anyone please tell me how to remove myself from the top commentators list?
There's a field for entering your name: "Filter your name from the list".
iEn said on March 22, 2008 10:43 AM PDT:
great script! thanks for sharing!
Jie said on March 29, 2008 6:31 AM PDT:
i think i've got the solution.
the last script &num=10 add &filter=yourname so it looks like this:
num=10&filter=Jie"
Yes, the script has three parameters:
* url = your blog's address (e.g.: http://googlesystem.blogspot.com )
* num = the number of people from the list (e.g.: 10)
* filter = a name you can filter from the list (e.g.: the author's name)
great script, just use it and work perfectly
here
Thanks for the great tips!
genny said on May 1, 2008 4:34 AM PDT:
thank you very much for the nice idea of top commentators...
can somebody please help me how you can filter 2 or more names? thanks alot.
I updated the pipe and you can now filter more than one name. Just separate the names using a comma, like this:
Mary Jane,genny
Note that you shouldn't use spaces between the names. It's worth noting that the names are regular expressions so you can filter all the names that start with Mary:
Mary .+
but if the names include special characters like ? . + they need to be escaped with a backslash:
WhoIsMarc\?
manu said on May 10, 2008 3:37 AM PDT:
Great! It's possible to link directly to the commentator's site?
i've added top commentator to my blogs but when i got comment it doesn't appear in the top commentator widget :(
I think this is idea is great. Is it supported by goolgle.
Colleen said on June 3, 2008 8:38 PM PDT:
That's awesome - thank you so much!
Cool!
Got it on my blog now.
Thanks a lot man. I think its a great for all bloggers who want to get lots of comments in their blogs. But Beware of these bloody spammers. Even i am thinking to add this Top Commentators script to my blog. But not now, may be after some time.
Anyways, its a Great idea for comment hungry bloggers.
Keep up this good work of helping others. Two thumbs for you.
Thanks for the reply to my inquiry but still I can't remove the WhoIsMarc? commentor. Any chance you can help me please?
Here's the last part of the code from my blog..
script \,whoismarc\?,marc \the one\ blessed src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&
_id=c92ac21897d8b56e61cfa85930dd89a1&url=http%3A%2F%2Fmarcdionisio.blogspot.com&num=10&filter=WhoIsMarc\?\,Marc,Marc\" type="text/javascript"
Sorry if I made a spam or something. Please help me. Thanks alot.
Š’etter use feed:
www.blogger.com/feeds/blogID/comments/default?max-results=N
Simply change blogID
blog ID can use for stand alone blogs
Thanks for sharing with us....
Gabriel said on July 28, 2008 12:27 PM PDT:
Is it possible to extend the range beyond 5,000? This was working like a charm until last week, when my blog went past the 5,000 comments...
@Gabriel:
Yes, it's possible, but the pipe is already very slow for 5,000 comments. The pipe will still work even if you have 100,000 comments, but it will only show the stats for the most recent 5,000.
Gabriel said on July 29, 2008 8:18 AM PDT:
Thanks, I know it's slow already, but it's the best way to keep track of my 'historical' top commentators. I guess I will have to figure out a way to modify your pipe and take it to a higher number... but I have no idea how to do it. :-)
thanks for the tip. I will put those to my two blogs and hopefully it will work. Ill be back to post some update.
CJ said on October 6, 2008 10:54 PM PDT:
I get the following error msg when I paste to my html:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The content of elements must consist of well-formed character data or markup.
said on October 7, 2008 6:56 AM PDT:
Hello! Can you please put the javascript code for the version in which a list of comments written by each person is revealed when clicked.