Skip to content

WordPress Top Commenters Plugin / Widget

This plugin will add a list of the most frequent commenters posting to your blog. They are gathered in descending order (highest number of comments at the top) The list items will be links to the comment author’s URL, if provided.

The following parameters are configurable by the user, either from the widget admin interface or directly (if used as a standalone plugin):

  • Number of people to show
  • List of names to exclude from the list: An array of names to be ignored from the counts.

Download FreePress Top Commenters Widget

Installation:

  1. Extract all files in the archive into your plugins directory. The archive should contain a folder called “freepress”, which should be placed directly under the plugins directory, and all the files distributed with this plugin should be in the “freepress” folder. For example: /var/www/wordpress/wp-content/plugins/freepress/topCommentersWidget.php
  2. If you are using the widgets plugin, the tagboard will automatically appear as an available widget for your sidebar.
  3. If you prefer to manually add the tagboard to your theme, you can insert the following code wherever you’d like the tagboard to show up:

    If you wish to manually specify the arguments listed above, add them in the order listed. The number of people to list will default to 10, and the names to exclude will default to an empty array (which will include all commenters).

*Note: This version of the plugin has been tested in WordPress 2.x as well as recent versions of WordPress MU. Please let me know by commenting here if you run into any issues.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Comment Feed

90 Responses

  1. Great widget! I’m using it in my blog, and this is the plugin I cannot find until now, thank you!

  2. Cool! Good to hear it’s working well for you.

  3. Wonderful plugin, thank you :-)

    I was just wondering how to write the people I want excluded.

    e.g. let’s say I want to exclude “Boo Radley” and “David”

    I tried echo fp_get_topcommenters(8, “Boo Radley”, “David”);

    but it doesn’t work

  4. Thanks for the feedback!

    The names to exclude parameter is an array value, so for the example you cited, you should be able to use:

    echo fp_get_topcommenters(8, array("Boo Radley", "David"));

  5. Thanks for your reply JB

    I entered this exact code now:

    but if you look at my blog you’ll see that the two names still show up. Any ideas how i can fix that?

    Sorry for bothering you

  6. Oops, my bad. Looks like that was a bug in that version.

    I’ve just fixed it and reuploaded, so if you download this new version it should be fixed.

    Sorry about that.

  7. Works like a beauty now
    Thanks :-)

  8. I need i find thank very mutch :-)

  9. I’m actually trying to find a plugin that does something similar to yours but instead links to a page that lists all the comments that each listed person has made on the blog, would your plugin be modifiable in this way?

    Thanks.

  10. Hey great plugin, got it working on my blog.

    just to let you all know I added a couple of restrictions, so the top commenters list wont show trackback nor pingbacks

    “WHERE comment_approved = ‘1′ AND comment_author != ” AND comment_type != ‘pingback’ AND comment_type != ‘trackback’ “;

  11. I run the Tiga-theme on my blog and the plugin works really nice. But I have a problem when I use IE. The font size is ok in FF but in IE it seems like the post name is far to big. Why is that and what can I do?

  12. I LOVE this plugin because I think it’s nice to show the regular commenters.

    I just switched to widgets (to make blogging a bit less stressful) and it isn’t showing up as a widget. I tried to add the code you suggested and it isn’t working.

  13. Ok I got the widget to work but I would like to edit it so it’s monthly and to have the number of posts right next to the name. Is that possible?

  14. Yes. When you say monthly, do you mean only showing stats for the current month, or showing historical info for the last X months?

    The first one would be a pretty easy addition to the SQL that is doing the count. The latter would require more design work.

    As for having the number of posts right next to the name, I’m not sure how that differs from the way it is now. What do you mean by that one?

  15. I meant the latter. I just want to have a list of the top 10 commenters for every month. The other thing isn’t a big deal, it just took up extra space but that’s ok.

  16. Hi:

    I installed the plugin and it list the top commenters. But it doesn’t make their name a link. The only one that is a link is my name. What am I doing wrong?

  17. The current version only adds links for registered users. I used to add the links provided in the comments, but don’t anymore for several reasons. Here’s a summary of the main one:

    People change URLs and/or provide different ones over time, and then I would need to alter the code and make sure I’m always getting the URL from the most recent comment by anyone of that name. If that were the only problem, then that solution (recoding) would be fine, and I would do it.

    The downside is that if it’s always going off the most recent comment by that name, then all a spammer would need to do is post a comment using that same name to get their link into the list.

    I prefer the registered users method, since it still takes all users into account, but only ads links for people who want them. Then they can go in and alter them anytime as well.

    I’ve also thought about going through and adding new user accounts for people in my top 10 list who I know have URLs but haven’t registered; I just haven’t done that yet.

  18. hi,
    this is a great plugin…the only bad thing to me is the same as Darwin, the fact that names of best commenters don’t link to their sites…!
    is it very complicated to program ? because in the comment part, people’s name is a link, so it’s possible to do it without a logged-in user, or account..no ?
    the spam is not really a problem, as askimet is doing a great job !
    thnak again, and i’ll be happy if you make a “names with links” version of your plugin
    great job,
    thank you
    LOmiG

  19. See my previous comment for why I don’t think that’s a good idea.

    It used to actually work that way, however, and it would be fairly easy to change it back.

    If you’d like to do that, all you would need to do is replace $user_data->user_url on lines 116 and 120 with $commenter->comment_author_url and it will use the links provided by the commenters.

    Just be aware that if you do that, there’s no way to prevent anyone at all from commenting using the same name as someone in your top commenters list and bumping out the original person’s link.

  20. Hmm, I download it, but I’m only getting the .php file. There’s no “freepress” folder or anything. I tried just putting the .php file into my plugins folder, but that didn’t work.

  21. You don’t actually need the subdirectory for this plugin, since it’s only one file. putting it in the plugins folder and then activating it should make it available.

    Once it is activated, you can follow step 2 or 3 (depending on whether or not you are using widgets) to add the listing to your theme.

  22. Is it possible to show the number of comments next to the commentors name?

  23. Yep; looks like you figured it out.

  24. Awesome plugin. I’m quite curious to see if this will draw some extra comments.

    Regards, George

  25. That’s a great plugin. It’s a pity it does only work on wp and not on other third-party blog management systems.

  26. Not really.

  27. Please check my site http://www.exguides.org Its showing SQL error first and then displays the commenters. And also it is pulling Pingbacks and Trackbacks. I would love to have option to exclude pingbacks and trackbacks from the plugin.

    Please check for bug on http://www.exguides.org

    I am using Wordpress 2.1.3.

    Actually I think its due to the ‘ sign in the commenter’s name.

  28. Ok I removed your plugin…I am using Otto Execute PHP in Widgets plugin and I added code from another Top Commenters plugin. But you should check your plugin since it fails when Commenter’s name contains apostrophe sign.

  29. Great plugin. It works well and brings a lot of new visitors.

  30. I’m sure this is an absurdly noob question, but how do I edit the color of the commenters’ names? The plugin is working great, but the default color looks horrible with my theme :)

  31. No worries; each name is a list item with a class of “topCommentersListItem”, so you can add something like the following to your CSS file:

    li.topCommentersListItem { color: #123456; }

    If your commenters are registered users with URLs, those list items will contain links, so you may need:

    li.topCommentersListItem a { color: #123456; }

    depending on your existing style definitions for links.

    Hope that helps!

  32. I added both lines to my CSS file, but I still cannot seem to get the color to change…

  33. Hmm, are you talking about the site you linked to in your comment ?

    I don’t see any lines in the CSS on that page that relate to the top commenters plugin, but I do see the following:

    #sidebar UL UL LI { COLOR: #777 }

    which is what is currently dictating the color of those list items in your page.

  34. I had added li.topCommentersListItem { color: #123456; } to the bottom of my CSS line, but since it did not work, I removed it. I have since added it again, directly under the spot you mentioned, but I still cannot seem to make it work. I’ll leave it up there so you can look at it and see what I’m doing wrong. Thanks for all the help so far :)

  35. Josh, no problem -

    Since the other rules are id based (with a #), you will need to override the color set in the line above this with the !important attribute, like so:

    li.topCommentersListItem { color: #800000 !important; }

    That ought to do the trick.

  36. Ah, that did it. Thank you so much, both for the great help and the great plugin.

  37. Thank you thank you THANK you for a cool plugin that does this, and just WORKS. I tried two other plugins before finding yours and neither one did it RIGHT. You rule.

  38. JB,

    First of all, thanks for the great plugins. I’m using the recent comments plugin and just added the top commenters plugin. I’ve also added you to my Supported Plugins list on my free Rapid Access theme page.

    I do have one small issue with the top commenters plugin that I’m thinking you can probably whip up a fix for very quickly. If you look at my blog you’ll notice that my top commenters have not entered a URL in their profile and it is creating a link to “http:///”.

    Could you modify the plugin to check for that and not create a hyperlink in that case?

    Thanks,

    John

  39. Yeah, shouldn’t be too hard. I’m sick right now, so I might not get to it right away, though.

  40. JB,

    I’m sorry to hear you’re under the weather. :-(

    Incidently, I gave a little more thought to this plugin and I’m worried that it is possible to have a few folks begin to dominate the Top Commenters box and after a period of time no one would be able to displace them.

    For this reason I would like to second the previous suggestion about only displaying the last month’s worth of comments. But actually, what I’d like to suggest is to have it display the top commenters for the last X number of days, where X is a user selectable variable in the plugin.

    Get well soon!

    John

  41. Good idea.

  42. JB,

    I’ve got an unusual issue. My own comments are showing up as the top commenter despite the fact that I’ve put my nickname in the exclude list on my blog. I am wondering if the fact that my nick has a period in it matters? Though I did put it in there both with and without the period. I also changed the name I was using for posting at one point so I have my old one in there and it is indeed excluding that one. Just not my current one.

    Also, out of curiosity do you think you’re going to have time to incorporate the “last X number of days” into the plugin any time soon? If not, do you have any hints as to where that change my be best and I’ll take a look at it?

    Thanks,

    John

  43. Hopefully I’ll take a look at that new feature soon.

    I can’t think of why the exclusion thing may not be working; I’ll take a look at that as well. I’m assuming you’re talking about the “John P.” one?

  44. Sorry about the slow reply. Yes, the one I’m referring to is the “John P.” user. I used to go by “The Man” and luckily that one is not showing up… :-)

    John

  45. hye JB.. nice plugin.. good job~ :D
    i want to ask, if i just installed the plugin, will it count from the second i installed it, or it will count the previous comments?
    because i cannot see any commenter list at my site now.. thanx..

    skyatiJune 16, 2007 @ 4:24 am
  46. Should count all previous comments.

  47. I’d love to use this plugin, but after downloading I am unalbe to extract the files…have tried multiple ways.

  48. Should just be a regular gzipped tar file; tar -xzf topCommentersWidget.php.tar.gz

    Maybe I need to post zip versions for people who can’t get the gz versions for whatever reason.

  49. This plugin is a must peeps love to see themselves on the list.

    Thanks

    Vic

  50. hi, I’m just wondering if there’s a way to ‘Reset’ the count after let say 1 week, 1 month, etc. (just like the Show Top Commentators plugin(?

    SEO BloggerAugust 5, 2007 @ 5:18 pm
Newer Comments »



Some HTML is OK

or, reply to this post via trackback.

Continuing the Discussion

  1. [...]   Top Commenters Plugin / Widget,显示最多留言的访问者,�时支�widget。 comment sidebar [...]

  2. [...] There are blogs which have some really great interaction. In a way, some blogs that have specific topics could be quite hot, in terms of discussions. They become some sort of forums already and there are some very active commenters. If you would like to keep tabs on who are the top commenters on your blog, use the Top Commenters widget. [...]

  3. [...] I just added new wordpress plugin for my blog that is Top Commenters plugin. This plugin will add a list of the most frequent commenters posting to your blog. They are gathered in descending order (highest number of comments at the top) The list items will be links to the comment author’s URL, if provided. By default it will show up to top 10 commenters but Top Commenters plugin also allow you to define yourself how many commenters you want to display and list out which commenter that should not be count in. [...]

  4. [...] However I do still believe that people who take the time to write comments do add value so I’d like to give them something back in return, and a link is the easiest way to do it. So on my Recent Comments page I added a section to list the people who have made the most comments and give them a link back. I’m using the Top Commenters plugin for wordpress to do this so I don’t have to do it manually. Is it fair that a few bad apples spoil it for the whole bunch, nope, but it’s a reality we have to deal with. [...]

  5. [...] Thanks to Chris of Blog-Op for pointing this one out. The Top Commenters Widget fits neatly into your sidebar and lists the people who comment most often on your blog, along with links to their blogs. It’s a nice touch to give your most active commenters credit and link love. More importantly, the Top Commenters Widget is bound to create some healthy commenting competition. [...]

  6. [...]   Top Commenters Plugin / Widget,输出最多留言的文章列表,å?¯ä»¥è‡ªè¡ŒæŽ§åˆ¶è¾“出数é‡?。   上传激活。由于默认支æŒ?Widget,å?¯ä»¥ç›´æŽ¥åœ¨Widget里调用;或者在模版å?ˆé€‚ä½?置增加如下代ç ?: < ?php if(function_exists(‘fp_get_topcommenters’)) { echo fp_get_topcommenters(); } ?> [...]

  7. [...] Commenters can be encouraged with rewards. They’ll likely respond to a possible link (to their site) in your sidebar. It’s easy to showcase the top commenters with this Top Commenters Plugin. [...]

  8. [...] you may have seen from my notice above, I have decided to activate the DoFollow plugin and Top Commenters.  I believe this along with my great content will encourage discussion, because I know that I [...]

  9. [...] have decided to activate the DoFollow plugin and Top Commenters.  I believe this along with my great content will encourage discussion, because I know that I [...]

  10. [...] It was relatively easy to gather the data by copying and pasting the results spewed out by Top Commenters Widget. I set it up to display 2000 commenter names on my sidebar. Next, I copied & pasted the name [...]

  11. [...] will also be installing Top Commenters Plugin. Here is a description provided by the designer: This plugin will add a list of the most frequent [...]

  12. [...] FreePress Blog » WordPress Top Commenters Plugin / Widget Mwoh. Misschien zet ik dit er wel ergens op. Benieuwd, eigenlijk wel een beetje. (tags: plugin wordpress) [...]

  13. [...] FreePress Blog » WordPress Top Commenters Plugin / Widget Mwoh. Misschien zet ik dit er wel ergens op. Benieuwd, eigenlijk wel een beetje. (tags: plugin wordpress) [...]

  14. [...] Top Commenters Plugin-Widget:Adds a linkable list to the sidebar of the top commenters on your site. [...]

  15. [...] can give the reward for the top commenter either by installing Top Commenter widget for Blogger and Wordpress Or you can write a monthly top commenter right at your blog with the link to their [...]

  16. [...] FreePress Top Commenters Widget adds a list of the most frequent commenters posting to your blog. It does not work well out of the [...]

  17. [...] 6. Top Commenters – This plugin will add a list of the most frequent commenters posting to your blog. They are gathered in descending order (highest number of comments at the top) The list items will be links to the comment authorâ??s URL, if provided. The following parameters are configurable by the user, either from the widget admin interface or directly (if used as a standalone plugin): a. Number of people to show b. List of names to exclude from the list: An array of names to be ignored from the counts. [...]

  18. [...] your commentors – through a top commentors plugin, people can get a link back to their site if they comment enough. The way the plugin works is that [...]