Tuesday, 11 September 2012

Top Commentators Cloud Widget For Blogger

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.

It's great way to show you top commenters of your blogger and it's also easy to install. As you can see in above pic this widget just looks like label cloud widget , commenters are the most important part of blogging and it shows them in a cool cloud so i think you might give it a try. It's only available for blogger comment not disqus or any other comment system.

Installing :

  •  Go To Blogger > Layout > Add A Gadget > HTML/JavaScript > Paste following script :

<!-- Top Commentators Cloud Start
(c) 2010 Blogger Sentral. Original code by http://www.bloggersentral.com/. Please do not remove this credit and the “Get this commentators widget” link at the bottom of the code.-->
<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
 max = ccCount;
if (ccCount < min)
 min = ccCount;
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
 <script src="http://pipes.yahoo.com/pipes/pipe.run?
<span style="font-size: 80%; float:right;;margin-top:5px;">Get this <a href="http://widcraft.blogspot.com/2012/09/top-commentators-cloud-widget-for-blogger.html" target="_blank">commentators</a> <a href="http://www.widcraft.blogspot.com/" target="_blank">widget</a></span>
<!-- Top Commentators Cloud End -->

Customizing :

  • Replace http://www.widcraft.com/ with your blog's url. Make sure you omit the slash at the end of the URL (as in .com/). 
  • Replace Anonymous,Admin with the commentator names you want to exclude from the cloud. Separate each name with a comma, and don’t put space between them. 
  • Replace 20 with how many top commentators you want to appear in the cloud. 
  • In alphabet Enter alphabet if you want to arrange the names alphabetically. Enter frequency if you want to arrange them by frequency (with the most frequent commentators on top). 
  • cCloud Comment count (in bracket) is displayed by default. To remove it, just delete this line of code.
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
Powered by Blogger.