Tuesday, March 04, 2008

Top Commentators for a Blogger Blog

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: , ,

98 comments ( Post a comment )
Ah this is brilliant!

Thank you very much.
This is terrific. Thank you.
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.
Is there any way to remove myself as a top commentator? That would be the icing on the cake.
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?
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!
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
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).
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.
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.
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.
Your use of "commentator" is a misnomer; you mean "commenter."
"Commenter" is not even in the dictionary.

Merriam Webster
Cambridge
WordNet
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.
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".
great script! thanks for sharing!
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!
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\?
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.
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....
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.
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.
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.
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.
Now i understand.. Thanks for kindly sharing
thank you very much for the nice idea of top commentators...
Thanks! I was looking for it!
Thanks a lot. It is live on my blog http://ok-lah.blogspot.com
that's awesome. thanks for the info. i've been wondering about how to do that with blogger. that's PHENOMINAL.

thanks
Thanks. I have been really doing a lot of research on this whole "top commentator" thing. This really helps. Thank you.
WOW. I would have never thought of that. I love the power of the Internet. More heads are betting than one.

THANK YOU!

Kenney
I have another blogger blog that I wanted to do something like this with, but I didn't know what or how to do it. I am so glad I found this.

Kimberly

Thank you.
Thanks for the tips. I will put those to my two blogs and hopefully it will work. I don't think you can put this in the blogger account now. google will never support such plugins.
hello! thanks for this! i tried this on my site but how come it is not working? copied the script that you provided and followed your instructions. please help?! thanks!
Top Commentators widget is a nice thing. It will increase the commenting rate on blogs.
nice hack
It's really good idea that I was searching for. Thanks for sharing
Thanks, I totally support that. It's very nice, too.
This is cool, i would love to make a post on my blog on this and a link back to your blog of course.
Thanks for this gem. I`m gonna set my friends blog up with this. I don`t have much time to use it for myself yet but Slams will appreciate it.
Thanks a lot!
Is there any way to remove myself as a top commentator? That would be the icing on the cake...
can somebody please help me how you can filter 2 or more names? thanks alot...
Thanks.. This is really helpful.. I was looking for a way to attract comments.. This sure is really useful..
Is there any way to search on google all the blogs that are having the blog comentators option?
i'll try this out in this site: http://newsblog1st.blogspot.com. thanks!
it doesn't work in my site. i add the javascript but it dones't show top commentators.



*sigh
top commentator is sweet, it attracts traffic and rewards the readers. keyword luv is a nice combo as well.
It doesn't work on my blog. I used non-English converted characters in my blog name, maybe that's the reason? Blog address is:
http://xn--l1b4e4a1c.blogspot.com/
OR
http://अनिल.blogspot.com/
What's the matter??
Good List out there
What a awesome tips, Top commentators list can be helpful to get more comments...
Many thanks for this very useful script
Thanks much for the tip.
I'm going to make top commentator list in My HD wallpaper blog.
Thanks
Very handy. Thanks for including this
DERIVATIVES
commenter |ˈkɑˈmɛn(t)ər| noun
ORIGIN late Middle English (in the senses [expository treatise] and [explanatory note] ): from Latin commentum ‘contrivance’ (in late Latin also ‘interpretation’ ), neuter past participle of comminisci ‘devise.’

Commenter is a word...
Nice

I think blogger should integrate stuff like this.

Actuallu this is gr8 for all bloggers who want to get lots of comments in their blogs. bt nt the spammers ..

Top Commentator is sweet, it attracts traffic and rewards the readers.

I think i should also add this Top Commentators script to my blog.

Anyhow its a best idea for comment bloggers...
very nice

excellent idea to give back to those that comment on your blog the most

keep up the great work !
awesome technique, I really enjoyed reading this article. These types articles will encourage non spam commenting. Thanks looking for more good techniques.
nice script!
this script is dead
@Alessandro:

The script is not dead, it's just popular. Most likely, you've seen this error: ""The Pipes engine request failed (999)". According to Yahoo, "a 999 error implies you are over utilizing our service. Please try throttling back the number of requests made to the Pipes site and within a few hours you should no longer be blocked."

The solution is to go to the pipe's page, log in using a Yahoo account and clone the pipe. You'll get a new pipe that looks the same, but it's no longer blocked.
Hi Alex

The pipe worked pretty good until 2-3 days ago...so I followed your suggestion and clone the pipe, and changed the ID numbers, but it still doesn't show up. Could you help me out with that?

Thank you very much!
Angie's Recipes
@Angie's recipes:

You included two pipes in your blog and the first one is completely incorrect. First of all, you've used the same function name twice (pipeCallback) and the JavaScript file you've linked is incorrect. Make sure you change the function's name (e.g.: pipeCallback2) and you use the proper JS file (it starts with http://pipes.yahoo.com/pipes/pipe.run?_render=json...).
wow... thanks a lot... i'm glad i am able to view my blog's comments separately.. nice information...
Priceless script.Thank you
Wow, Your blog is really good..Pretty cool, Although I think blogger should integrate stuff like this.

By the way good tips. I will put those to my blogs and hopefully it will work. I don't think you can put this in the blogger account now. google will never support such plugins.

Thanks for kindly sharing
excellent idea to give back to those that comment... thanks a lot
Looks very nice.. thanks for sharing :)
Top commentators only flashed when these guys are commenting on a regular and periodic basis for the recent posts.. Its always good to get the entry there.. but to maintain its position may take some longer..
yea and spammers like above come around as to get free backlink
Thanks for this great
Added widget-script one on blogspot, did cut and paste of your code; deleted the word blogname and added http://travelingsuitcase---it didn't work. Nothing is visible on my blog.

Please help
Sandy
Traveling Suitcase
Apparently, Yahoo deleted my pipe. I have no idea why they did that.