This plugin creates a widget to show the top commentators in your WP site. Always go back to the Widget settings after each version update to Save your settings.
The Top Commentators Widget plugin is adapted from Show Top Commentators plugin at Personal Financial Advice, this widget is easier to manage via the control form (no need to edit the PHP file); additional options are also available to make it more flexible. Read the FAQ section on how to customize the widget. Read the Changelog as well as http://webgrrrl.net/tags/tcw for the latest news on this widget.
This widget is extensively tested with the following settings: Google Chrome 13.0.782.215 m, PHP 5.2.13, Apache 2.2.15 (Win32), MySQL 5.0.51a, WordPress 3.2.1. Further testing and bug report on this widget is greatly welcomed and appreciated.
- How do I use this in my blog?
Obviously, you must be using WordPress on your site. Your theme must also support widgets (if unsure, check with the person who designed the theme). If it doesn’t support widget, please use the Show Top Commentators plugin instead; it should work similarly to this widget.
- What options do I need to set in this widget?
None. Just follow the installation steps and and it is ready to run. Customization is not necessary if you don’t want to bother doing so.
- Problem: This widget stopped working after I upgraded. What should I do?
Go to your Widgets settings and click Save in the Top Commentators widget settings. Otherwise, please submit a report in the Support Forum.
- Problem: The hour / month / year / (whatever period) Reset Period setting doesn’t work, not matter how I change it.
The “specify number of days/date” value will ALWAYS be prioritized before the Reset Period dropdown options. Therefore, if you choose to use any of the dropdown options, make sure to leave “specify number of days/date” text box empty.
- Problem: The widget only appears in my homepage and nowhere else.
By default, the Top Commentators list will appear only in your homepage (read this site to find out why it’s better). If you want the list to appear site-wide, then set the “Show in home page only?” option to No.
- Problem: No comment/wrong number of comments appeared after I installed/upgraded the Top Commentators widget.
Try one or more of the following tips below to solve this:
- Go to your Widgets settings and click Save in the Top Commentators Widget settings.
- Empty the “specify number of days/date” text box.
- Make sure the Reset Period is set to the period you choose.
- De-activate, and re-activate the Top Commentators Widget. Then go back to your Widgets settings, remove the Top Commentators from your sidebar, and re-add it again. Then Save the widget settings again.
- Don’t use the Back button of your browser to go back to your Widgets settings. Always reload the Widgets page before changing the settings further.
- What are the options that I can change in this widget?
Good Lord, a lot! Ensure that you first follow the Installation instructions to activate the widget. Once you have the Top Commentators widget on the sidebar, click the control icon of this widget to change the following:
- Change widget title: Change the standard title (Top Commentators) to any snazzy title, like Bloggers of the Month or Commentors Who Owe Me a Million Bucks.
- Add description below the title: You can add an extra description if you want to. NOTE: Certain WP themes may not display this correctly.
- List those with a minimum of XX comments: Show only users who achieve a minimum number of comments before they get displayed here.
- Exclude these users: Exclude commentators based on their names, like Administrator or yourself. Don’t enter any email filters here; they belong in the Filter full/partial emails field.
- Reset list every period: Reset the list to generate commentors hourly, daily, weekly, monthly, yearly, or all-time. You can also reset the list within a certain number of days, like every 15 days or 66 days and so forth. As of version 1.2, you can specify a specific range of date; for example, to display top commentators between January 1, 2009 and March 31, 2009, you should type 20090101 and 20090331.
- Limit the number of names listed: If you want to list the top 20 commentators, type in 20.
- Limit the number of characters in each name: Useful if you want to control the list from breaking your sidebar design. Names that have characters longer than your setting will have a trailing ellipses. If you want the names to be longer, change to a higher value such as 35. Otherwise, if, say, you change it to 3, then Lorna will become Lor… .
- Add remarks for empty list: Display some notice to appear when your top commentator list is empty, like “Be the first person to comment”.
- Filter full/partial URLs: Works just like Exclude Users, except this will filter by URLs.
- Filter full/partial e-mails: Works just like Exclude Users, except this will filter by e-mail address. NOTE: This may not work with WP 2.3.3 and lower and currently in the buglist.
- Display list type as bulleted or numbered list: That’s pretty much straight-forward.
- Hyperlink names: Choose whether you want the commentors’ names to be linked to their URLs or not.
- Open each link in a new window: Choose whether you want the links to open a new window (target=_blank).
- NoFollow links: In case you want to display their URLs but make it NoFollow to stop Google juice.
- Show number of comments made: Like it says.
- Group commentors based on e-mail or user names: This option is added to solve the hijacking problem various blogs have been reporting if commentors are grouped by user names.
- Show in home page only: If you select Yes, then the Top Commentators list will only appear in your main page; otherwise, the list will appear in all pages that have your sidebar displayed.
- Display only commentators with URL: If you select Yes, then the Top Commentators list filter out commentators who did not leave any web site URL in their latest comment.
- Display Gravatar: If you select Yes, then a Gravatar will appear on the left side of each commentators name in the Top Commentators list.
- Gravatar type and size: If you select Yes in Display Gravatar, the images will appear based on the type and size you specify here.
- Awards those with at least XX comments: If the number of comments is equal or greater than the number specified here, then an award icon will appear. No icon will appear if this number is set to zero (0).
- Align Award icon: Set where you want the award icon to appear.
- Problem: The widget screwed with my sidebar design!! WTF??
Firstly, take a deep breath and calm down.
OK now? Great.
When this happens, it could verily mean that you will need to tweak your CSS file of the WordPress theme you are using. Not only will you need to look into formatting the UL, OL and LI of your sidebar, you also need to consider the use of A in the existence — or absence — of hyperlinked commentators’ names. The easiest way to do this is:
* Identify the CSS elements that exist around and within the Top Commentators Widget. You can identify the tags surrounding the TC Widget with the words “top-commentators” or “widget widget_topcomm”.
* You may or may not want to add a new CSS element specifically for the TC Widget. Get someone you know who’s good with CSS if you’re not comfortable doing this yourself.
By the way, if you want to tinker with the style for this widget’s Gravatar, just add a class called tcwGravatar to your style.css file and add any CSS element to it. For the Award icon, look for the tcwAward class.
- Fixed Gravatar’s image request URL.
- Bugfix for 1.5 due to not displaying a list at all.
- Repositioned add_action() hook.
- Rectified commentator grouping by e-mail or by names.
- Added an option to list out commentators with a minimum required number of comments before being displayed.
- Added Default Blue, Retro, and Blank to the Gravatar icon options.
- Optimized the query for “Exclude these users” option (presumably could lower database/memory load?).
- Edited the query for commentators’ URL (presumably could solve the “same URL for all users” problem that I tried hard to replicate but couldn’t?).
- Further improved query against URL hijacking (searching based on e-mail instead of username).
- MAJOR CODE REWRITE! This may break any customized CSS you may have on TCW.
- Support for multiple instances of the widget. This means that you can have TCW on as many sidebars in your blog as you want, each with its own unique settings.
- Added the Award option which will display image or icon of a medal/badge once a commentator reaches a certain number of comments determined by blog owner.
- Modified the form to allow default values to be entered automatically when initialized (i.e. widget’s Save button is pressed).
- Added support for setting default Gravatars to 404, Mystery Man, Identicons, MonsterIDs or Wavatars.
- Repaired the query statement for filtering e-mails.
- Rectified the SQL query for filtering list by hour.
- Added target=_blank option which will open links in a new browser window.
- Added filtering based on range of dates.
- Fixed the Year value error which prevented it from being highlighted when selected and saved in the widget control form. (noted by Sebastien, https://wordpress.org/support/topic/205463?replies=2#post-876591)
- Added Gravatar support (thanks to the codes by Sergio Nascimento, http://www.coisasdosanduba.com/).
- Added Display only commentors with URLs.
- Fixed the bug which displays the URL of a comment marked as spam, but having the name of a valid commentor (since TCW always selects the latest URL entered by the same commentor user name).
- Corrected the extra closing widget tag that appears when Show In Home Only is selected.
- Re-arranged functions to avoid redeclare error in WP 2.5.
- Modified widget control form to repair unclickable control form.
- Added NoFollow option to links.
- Added show comment count option.
- Fixed the reset period (not tested extensively).
- Fixed the URL filtering.
- Include option to list users by e-mail or user names.
- Include option to filter users by e-mail.