Wordpress plugin: Comment Rating
Aug 16th, 2009 by Bob King
If you’re tired of moderating readers’ comments on your blog, stop doing that and let your readers decide which comment deserves to be shown. If you’re getting outrageous comments on your blog, don’t get too angry yet. Let’s see how many readers feel the same. You can do these tasks (and more) with the Comment Rating plugin.
Comment Rating makes “user moderated content” possible. This plugin automatically embeds clickable images in comments using simple light-weight AJAX javascript (not heavy-weight jQuery) to allow visitors rate comments in Like vs. Dislike fashion. The votes are displayed along with the comments in either two numbers, one combined, or both.
Once the user ratings are in place, the comments can be displayed and styled accordingly. Poorly rated comments (too many Dislikes, not enough Likes) can be hidden in a click-to-see link, just like those on Digg. Highly-rated comments (a lot Likes and few Dislikes) can be highlighted. Hotly-debated comments (many Likes and
Dislikes) can also be highlighted to draw more attention, to fan more votes and comments.
The thresholds for all three types of comments are configurable. So are the styling. Styling can be done with background color, fonts, etc. on the comment as well as the entire comment box.
This plugin allows using Wordpress as a general CMS in a Web 2.0 fashion. User generated content can be voted by other users. Example website is Caption Wit. Followings are a few example screen shots.
Summary of key features;
- Now there’s a companion plugin which display comments with ratings on a side bar. It’s called Comment Rating Widget.
- Auto-insert to comments AJAX based clickable images
- Configurable display of two vote numbers, a combined one or both
- Preventing voting fraud with one vote per IP address. This is less subject to manipulation than cookie based approaches. The author of a comment cannot rate his/her own comment.
- Styling of popular and mostly debated comments based on on the votes
- Poorly rated comments can be hidden in a click-to-see fashion. There’s no point of silencing your own voice on your blog. So when readers mark a comment by the blog author or admin as poorly rated, the comment will not be hidden, but only marked as poorly rated.
- Styling of the vote numbers differently.
- Mouseover effect on images to entice voting
- Choice of images and image size
- Localization support
- Functions are provide for theme customization.
- Allow vote types of: positive only, negative only votes or both.
- Store votes in wp_comments table comment_karma field. Stored votes can be: positive only, negative only votes or combined.
- Simple and light-weight (i.e. high performance). It’s also wp-cache and wp-super-cache friendly.
Comment Rating plugin is built on top of Alex Bailey’s discontinued Comment Karma. It’s released under GPL v3. Thanks to Jean-Paul Horn and many other users for ideas and suggestions.
You can download the latest version here.
Installation
After download the plug in, you can upload and install it from Wordpress Dashboard -> Plugins -> Add New. Alternatively, you can unpack and upload the file to the wp-content/plugins folder on your blog.
You can configure the options under Setting -> Comment Rating. The default options should be good enough. It works out of box. You are done. Sit back and have a look at your blog.
If you want to do tight integration with your theme in placement and style, you will need to insert the following line into your theme “comments.php” file within the comment loop.
<?php if(function_exists(ckrating_display_karma)) { ckrating_display_karma(); } ?>
Frequently Asked Questions
For questions & problems, please refer to the Comment Rating Plugin FAQ.
Known Bugs
- If you enable Comment Rating, disable it and then enable it again, the comments were made during the disabling period will not have any database record and won’t show any rating images.
Before I can fix this safely, please avoid disabling the plugin for a long period of time. Fixed in version 2.8.2. - If there are more than one hidden comment displayed on a page and you click to view on one of them, then you have to click to view TWO times to view the second one.
This is caused by a single toggle variable controlling all comments. I’ll fix it when I get some time.
To Do List
Please submit feature requests here.





Comments