CyberKnowledge Technology Blog

Everything tech – reviews, tips, software, news

All tech all the time

Welcome to CyberKnowledge technology blog.

WordPress Plugin: Rate Your Comments (Comment Karma)

Posted by Alex Bailey On October - 15 - 2006

May 06, 2012 Update
This version of Comment Karma works for the newest version of WordPress 3.3.2. Thanks to Wealthy Netizen for picking up where I left off on a discontinued project.

DOWNLOAD Version 2.9.32


Comment Karma not working for you?

Since a large number of people are both successful and in need of assistance, I can’t and don’t have enough time to help everyone. If you’re willing to pay a small donation for me to install or modify the plugin on your blog use the contact form. You may also email th3rub3x|@|gmail[dot]com (same as paypal).


After searching Google for a few minutes for a comment karma/rating plugin for WordPress I was amazed I couldn’t find one. So I read through WordPress documentation for a bit, and dug in.

Comment Karma 1.1 Release
Fixed:
*Security issue.
*Hovering over the images gives you a mouse cursor now.

Comment Karma 2.0 Release
Fixed:
*Security issue.
*Better MySql queries and table indexing to increase performance.
*Allows you to see how many times a comment has been modded up, down, and the total.
*No longer displays to negative signs when a comment is below zero.

*When upgrading to 2.0 your existing comment karma count will be lost due to the new database structure. This is because it’s now tracking both up and down votes, and before it was just adding and subtracting from one number.

Comment Karma 2.9.32
*Fixed for newer versions of WordPress
*Hide poorly rated comments
*Works with Wp-cache
*Choice of up and down arrows
*Better voter fraud detection

What is it
This is a plugin for WordPress blogs that allows users to rate or moderate other users comments. You can click thumbs up or down, and it will give them a positive or negative number. Basically the exact same thing you’ll find on Digg or Slashdot.

Issues
Currently there are no known issues, it works like a charm. If you’re using WP-Cache or similar the icons will not show up gray, nor will the numbers be updated if you reload the page until the page expires. However if a user votes again it will throw them an error. I’ve worked around this by setting the cache for 120 seconds. That way the server doesn’t get hammered with SQL queries, but you still see the comments being moderated in almost real time.

If you’re having trouble installing 2.0 from 1.1, try deactivating the plugin, deleting the files and reupload them. Proceed to PHPMyAdmin and drop the ck_karma table. (Sorry, it’s the only way). Then enable the plugin and use it as you normally would.

Installation

Newest version has one click install!

Unzip the folder you downloaded, and upload the whole thing in to your plugins directory. You’ll need to edit your header file, and add:

<script type=”text/javascript” src=”http://domain/wp-content/plugins/ck-karma/ck-karma.js”>
</script>

I added mine directly under the head tag. Next depending on your theme you need to edit your comments theme file. You need to add ck_display_karma(); in your comment’s for each loop. Look for “foreach ($comments as $comment)”. You can insert it in that loop. Mine happens to be here:

<?php if (comment_subscription_status()) { echo ” (subscribed to comments) “; } ck_display_karma(); ?>

Skip to this step:

Lastly enable it via plugins page. That should install all the needed tables.

Questions? Comments? Bugs?
If you have questions about installing or using it you can post a comment on this post. This is so people having the same issues can easily get the fix. If you’re willing to pay a small donation for me to install or modify the plugin in any way use the contact form. You may also email th3rub3x|@|gmail[dot]com

Download
Comment Karma 2.9.32
Broken on newer WordPress installs:
Comment Karma 2.0
Comment Karma 1.1

Thanks to
Bawked – Wrote the ajax, and debugged the PHP.


3 Responses to “WordPress Plugin: Rate Your Comments (Comment Karma)”

  1. Rub3X says:

    This is a test comment, so you can see the ratings. Enjoy!

  2. Ian Harris says:

    Hello. I wonder how hard it would be to rank the comments according to their rating? So poor comments get buried and good comments rise to the top. I guess it would be difficult?

  3. Raj says:

    Hi,

    I have activated this on my new site; keepreadingus.com [using wp v2.0.5], but the voting images are always grayed out. Why is this so?

    Does the plugin take into account the IP of the machine fromw hich the commpent is posted from?

    Or is this some kind of error that needs to be fixed. I even tried logging out and checked, but they ares till grayedout.

    Thanks for any help.

Leave a Reply