How To Add Top Commentators Widget for Blogger

Posted by Lasantha Bandara on May 17th, 2009 File Under : background, comments, gadget, widget3 Comments

If you like to add Top Commentators Widget to your blog follow the steps below.It will increase the commenting rate on blogs.

1.Log in to your dashboard--> layout- ->Page Elements

2.Click on 'Add a Gadget' on the sidebar.

3.Select 'HTML/Javascript' and add the code given below and click save.

<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 + "'";
if(obj.value.items[i].link == "")
var item ="<li>" + obj.value.items[i].title + "</li>";
else
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=2f414149ab66e0892a6a179016f93019&url=http%3A%2F%2Fyourblog.blogspot.com&num=10&filter=" type="text/javascript"></script>

Note : Remember to replace yourblog with your blog name.Do not include http://

You are done.

File Under : background, comments, gadget, widget

3 Responses to “How To Add Top Commentators Widget for Blogger”

  1. වෙජී‍ says:

    This didn't work for me. It just added an empty widget to the blog. 🙁

  2. Blogger Tips And Tricks|Latest Tips For Bloggers says:

    Ok,

    Thank to inform this.I correct the problem.Now this work correctly.

  3. වෙජී‍ says:

    Cool man. Now, it works fine. Thanx a lot. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.