Comment Rating plugin: Todo list
Sep 9th, 2009 by BoB
Looking at the long list of comments, I know that Comment Rating has hit something that some of us are passionate about. I’m really glad this little plugin can be useful, in the Web 2.0 user generated content arena.
As always, the design principle of the plugin is to be simple, efficient and widely applicable. A little flexibility doesn’t hurt.
Many of you, Jean-Paul, Jim and Tricky in particular, had made excellent suggestions. However, many issues are rather complex and we need to think them through to design right. Here’s a list of features that I’m convinced to be necessary.
- Flexibility of showing, 2, or 1 Like/Dislike counters. Done
- Styling highly-rated comments. Done
- Styling poorly-rated comments. Done
- Styling controversial comments. Done
- Option to turn off built-in styling. Done
- Wording changes based on rating. Done
- Tracking cookie to prevent voting fraud
- Add functions to retrieve rating number for theme customization.
- Choice of icon/images. Done
- Option to turn off styling the whole comment box. To avoid messy styling of nested comments . Done
- Option to change mouseover effect. Done
- Localization. Done.
- Widget to display comments with ratings. Done (v. 2.9.0).
- Sort the best comments to the top, so that the typical viewer will certainly not read all 150 comments on a popular blog, and everyone will benefit from the community ranking if they can simply view the “cream of the crop” right away. Done in the Pro version
- Allow vote types of: positive only, negative only votes or both. Done.
- Voting by registered member/comment contributor only. Done in the Pro version
- Add voting images to comments of a certain post only, posts are identified by PostID or category. Done in the Pro version
- Add option to customize the ‘thumb up’ – ‘thumb down’ ALT and TITLE text. Done (v. 2.9.7)
- Allow customizing the CSS tags around the voting image/ratings. Done in the Pro version
- Display the best voted comment in post or except in front page. Done in the Comment Rating Widget Pro
- Shows percentages instead of numbers. Or the ability to exclude the numbers all together
- WP short code to display selected comments in anywhere in a page.
- For voting only by logged-in member, make a small popup window to show people that they have to register once they click on the rating button. Done in the Pro version
- Rating correction in the admin panel: so in case someone messes up with the ratings, an admin can go into the plugin page, enter the comment ID and get its negative posts reseted to 0. (I’ve been doing this through the DB directly since the guy is messing with my site’s ratings).
- The ability to let anonymous users only up-vote comments, while logged-in users can both up-vote and down-vote comments. Users who are not logged in will see a a custom message (after the score) saying that they can down-vote if they log in.
- Limit the comment rating to post only or page only or both. Done in the Pro version
- Need a way to track what users are voting what. There is one user who is voting every comment down, which is frustrating all of our other users.
Discussion Sept. 9, 2009.
Hiding the entire comment box of poorly-rated comment wouldn’t be wise. This is a freedom of speech issue, rather philosophical. If some comments are really out of line, the admin can always remove it. Allowing a majority of readers doing so means suppressing the minority. It’s not good building online communities.
Now regarding “Styling highly-rated comments”, I’m now convinced that (Likes – Dislikes) is a better indicator. Many suggested multi-level of styling. More flexibility, Great idea. So here’s my plan:
- Good: (Likes – Dislikes) >= A
- Great: (Likes – Dislikes) >= B
- Superb: (Likes – Dislikes) >= C
Styling and wording can be changed at different levels.
Now, I’m also thinking about the hotly-debated issues. Often time, the most controversial issue is the most interesting and draws the most attention. Here’s another grading system.
- Hot: (Likes + Dislikes) >= A
- Heated: (Likes + Dislikes) >= B
- Outrageous: (Likes + Dislikes) >= C
What do you think? Are 3 levels too much? Shall we use 2 instead? Please comment.
Update Sept. 25. 2009: I think 3 level of different styling on all 3 type of comments will make your blog comment section a colorful rainbow. This will no longer serve the purpose of highlighting the important or interesting comments. So I’ll leave it to one-level of style per type only.
Bob,
I thank you for putting a lot of effort on this plugin.
First, in my opinion, styling should be in site owners hands, they are responsible for the CSS, that makes your plugin more flexible. I think that adding styles via comment_class allows theme designers to highlight or dim the text using selectors.
I agree with the 3 levels, it could spice the debate.
Will this make the plugin take longer to load? (could be an issue for highly visited/commented blogs). At first i think it should´t as it just adds a small arithmetic operation. Am I right?
Well-loved. Like or Dislike:
47
15
[Reply]
Bob King
Reply:
September 9th, 2009 at 9:28 am
There’re always people who won’t touch CSS with a 5 feet pole. So, options in the plugin are necessary.
The plugin is very efficient. Besides, busy wp sites must use caching. There should be no concern on the loading time.
Well-loved. Like or Dislike:
19
12
[Reply]
jim
Reply:
September 9th, 2009 at 12:12 pm
Bob, it’s just fantastic you are taking everyone’s considerations on board.
Tricky brings up the reason for allowing styling (comment class) for negative comments – it wasn’t so much for creating a large red highlight for negative comments, it was to created a faded comment container, avatar, $text, and all other elements using “style=”opacity:;filter:alpha(opacity=)”.
However, i do realize that users may have different elements in the container, which may mean the usage of this feature may become even more niche, so i didn’t want to suggest this is a default setting for you to hard code into the plugin, but if you allow the option to style negative comments, some users will find it easier to modify the code to add the negative comment_classes to these elements. Or you could attempt to create an option to switch on something like:
“opacity negative comments classes? Yes/no – warning, if you have additional elements in your comment container they will not fade”
Then You can make it so, when this option is on, it adds negative the negative comment_classes to:
“comment-author vcard”
“fn”
“comment-meta commentmetadata”
There might be others it needs to be added to, and obviously the actual rating plugin also needs to become faded, too.
Hot debate. What do you think?
12
12
[Reply]
Bob King
Reply:
September 9th, 2009 at 12:50 pm
Jim,
The opacity explanation makes great sense. Thanks
Hot debate. What do you think?
7
7
[Reply]
Bob King
Reply:
September 9th, 2009 at 1:31 pm
Have a look at version 2.4.5 with opacity. This is a transitional version with cleanedup code and ready to add the Todo features.
Let me know your feedback.
Hot debate. What do you think?
6
5
[Reply]
jim
Reply:
September 9th, 2009 at 3:26 pm
had a quick look. The new counting method solves all the issues it seems, which is great!
When you say 2.4.5 and opacity, do you mean you’ve added a negative comment class “ckrating_poorly_rated”? I haven’t had too much time to play with this yet, but i assume we’ll need this comment class on other elements too if we want to use opacity on the avatar, meta data, and so on?
Perhaps a neat solution is for one more comment class for negative that you can link to these additional elements (i think the elements are comment-author vcard, fn, and a few others) – a kinda hidden feature used ONLY for those who want to do custom styles to get opacity on everything.
Hope that makes sense.
Hot debate. What do you think?
4
5
[Reply]
Bob King
Reply:
September 9th, 2009 at 4:39 pm
Apparently, if you define a class for the whole comment box, the opacity applies to every element, including avatar, text and images.
Like or Dislike:
4
2
jim
Reply:
September 9th, 2009 at 8:32 pm
ah, so it does, that makes it a lot simpler
This is now working very well, love it. You can see how it’s evolving on my page here: http://img9.imageshack.us/img9/1043/commentdev.gif
Looking forward to see what you implement next from your to-do list
Like or Dislike:
4
3
jim
Reply:
September 9th, 2009 at 12:17 pm
ps, # Wording changes based on rating
looking forward to this little added bonus, it’s these smaller things that will make this plugin so powerful and versatile
Hot debate. What do you think?
6
4
[Reply]
this is looking good
Hot debate. What do you think?
7
4
[Reply]
Regarding “hotly-debated issues” that you wrote about above. Will these options also allow styling and rewording? Add all these together and you’ve got one powerful web 2.0 tool for comments. I’m sure an active community will get a buzz out of all the ways comments can end up rated, and three is certainly a sweet spot and doesn’t seem overboard to me, in fact the outrageous one made me laugh, i can see Mac vs PC comments getting a lot of those
Well-loved. Like or Dislike:
4
0
[Reply]
Just a heads up:
should be:
or it won’t allow validation of as XHTML 1.1
Well-loved. Like or Dislike:
4
0
[Reply]
whoops, would not let me post that code:
basically, use quote tags round style type=”text/css” media=”screen”.
The screen part isn’t tagged so it won’t validate.
Like or Dislike:
2
0
[Reply]
Bob King
Reply:
September 12th, 2009 at 3:49 pm
Fixed in 2.4.6. Thanks.
Like or Dislike:
3
0
[Reply]
Wow, the last updates (my last version was 2.4.1) brought some of the most desired improvements and it’s now a fantastic plugin!
I think the most important remaining issue now is to enable cookie support.
An easy improvement would be to increase the whitespace between the voting button and the following number.
Otherwise I don’t think that you should overload the plugin with ever more features. If the plugin remains small you’ll also have less trouble to convert it for future WordPress releases.
Like or Dislike:
1
1
[Reply]
Bob King
wealthynetizen.com Reply:
September 19th, 2009 at 10:45 am
Good points. The objective is to keep the plugin small and efficient. There has to be a fine balance between features and complexity.
Add the whitespace in version 2.5.2. Good eye
Like or Dislike:
3
1
[Reply]
Hidden due to low comment rating. Click here to see.
Poorly-rated. Like or Dislike:
0
3
[Reply]
Bob King
Reply:
September 23rd, 2009 at 5:53 am
The highlighting serves the purpose. Making every comment a 5 star won’t.
I’m going to add a hot-debated highlight to draw attention to controversial issues.
Like or Dislike:
4
1
[Reply]
Oh yeah. I thought I should not have written the above comment. It does not make much sense actually.
When you allow me to STYLE the comment, I can very well put BIG 5 STARS as the faded background image of top comments. Does it sound usable? And yeah thanks for your helpful and prompt replies.
Now about a bug. (in WP maybe). The settings panel shows an error in the NEWS section.
“Warning: gzinflate() [function.gzinflate]: data error in /wp-includes/http.php on line 1787″
Everything seems to work though. So I didnt try to fix anything. Seems many people are facing same issue with different plugins and even while upgrading WP.
Like or Dislike:
0
1
[Reply]
Bob King
Reply:
September 23rd, 2009 at 9:27 am
If you want to style all your comments, you can do so with your theme.
That bug is an Wordpress issue.
Like or Dislike:
1
0
[Reply]
Deepak
Reply:
September 23rd, 2009 at 11:43 am
Thanks Bob.
Like or Dislike:
2
0
[Reply]
I am having a problem that popped up with one of the revisions to Comment Rating (not sure which). The problem is that when a comment is “low rated” the comment and a number of subsequent comments” appears dim, and then it goes back normal. An example showing this behavior is:
http://www.obamaconspiracy.org/2009/09/another-look/comment-page-3/#comments
Like or Dislike:
0
1
[Reply]
Bob King
Reply:
September 24th, 2009 at 9:49 am
Dr. Conspiracy,
You are certainly dealing with highly controversial issues. Great for Comment Rating.
I looked at your source code. Did you change the Poorly-rated styling to opacity:1.0;filter:alpha(opacity=100)
Please try the following: opacity:0.4;filter:alpha(opacity=40) !important
Like or Dislike:
0
2
[Reply]
Dr. Conspiracy
obamaconspiracy.org Reply:
September 24th, 2009 at 4:53 pm
Yes, after I posted my comment here, I changed the OPTION setting from opacity:0.4;filter:alpha(opacity=40) to
opacity:1.0;filter:alpha(opacity=100)
That got rid of the dimness but now high-rated comments apply the same high-rated style to all comments nested below, which mislabels them. What I need is for each comment to stand its own. I will try your suggestion preceding.
Like or Dislike:
1
1
[Reply]
Dr. Conspiracy
obamaconspiracy.org Reply:
September 25th, 2009 at 8:56 am
OK, to summarize the issue. When using NESTED comments, the styling of a high or low-rated comment is passed on to every comment below it. This means that every comment nested below a low-rated comment becomes semi-opaque, even if it is high-rated itself. The end result is huge blocks of dim text that are difficult to read and that have evoked complaints from readers of my blog. Also high-rated comments pass on that style to everything below it, resulting in huge blocks of brightly styled text that obscure the rating of comments that are really highly rated.
The result is such a visual mess that I am seriously considering dropping the plug-in even though comment rating in general is a popular feature.
I have turned off the opaque styling so at least that part of the problem goes away, but the high-rated styling continues to be an issue. While I don’t care about the dim, I would really like the high-rated style to work correctly.
Like or Dislike:
2
2
[Reply]
Bob King
Reply:
September 25th, 2009 at 9:37 am
I now understand the problem. It’s caused by styling the whole comment box. When there’s nested replies to the comment, the nested replies are styled the same as the top-level one.
Let me see how this issue can be handled properly.
Like or Dislike:
2
1
[Reply]
Bob King
Reply:
September 25th, 2009 at 8:17 pm
Hi there,
I’ve added the feature of turning off styling comment box in version 2.7.0. This should solve your problem nicely.
Please check it out and let me know.
http://wealthynetizen.com/wp-content/uploads/comment-rating.2.7.0.zip
Like or Dislike:
2
1
[Reply]
Dr. Conspiracy
obamaconspiracy.org Reply:
September 28th, 2009 at 6:05 pm
This solves my problem nicely!
Thanks. My comments are pretty again.
Well-loved. Like or Dislike:
4
0
Thank you for your previous plugin. I need this future plugin when it’s avalible. I vote for 6 levels. Sorry for my bad English from Spain.
Like or Dislike:
1
1
[Reply]
Thanks alot for this great plugin!
However, I do have one request: I would like to be able to customize the ‘thumb up’ – ‘thumb down’ text. If you could add such an option it would be very much appriciated! Cheers!
Like or Dislike:
2
0
[Reply]
BoB
Reply:
October 28th, 2009 at 10:44 am
Make sense. Added in the todo list.
Like or Dislike:
1
0
[Reply]
Nice plugin. Is it possible to use is plugin for rating posts too? I cannot find a similar plugin for rating plugins. (we seperate up and down rate counters)
Like or Dislike:
1
1
[Reply]
joan
joanpique.com Reply:
December 22nd, 2009 at 10:36 pm
One great plugin for rating posts is http://lesterchan.net/portfolio/programming/php/#wp-postratings
@BoB: Thx for your work i love your plugin.
Like or Dislike:
0
2
[Reply]
I wonder if it would be possible to allow comments to be hidden (adding the javascript code, line 335 on comment-rating.php) when having “auto insert” set to off?
Like or Dislike:
2
0
[Reply]
BoB
Reply:
November 8th, 2009 at 11:23 am
I think you just spotted a bug. When auto insert is off, poorly rated comments should still be hidden.
Will look into it.
Like or Dislike:
2
0
[Reply]
I would like it so that instead of a thumb image it would show text saying: Agree, Disagree and when a checkmark is suppose to appear just get rid of that. Email me to see if you can do that because it is unlikely i will check in back in about 2 weeks.
Like or Dislike:
0
1
[Reply]
gjch
Reply:
December 19th, 2010 at 1:15 am
I second the fact that some degree of extra customization would be interesting. But wow, that would give me the cold shower.
@14: you should read this piece: http://hackadelic.com/about/support-rules. BoB has no obligation to serve you man!!
Like or Dislike:
0
1
[Reply]
You should let us change votes!
Like or Dislike:
2
1
[Reply]
is there any tips if i want the rating icon to be place near the gravater author not just the position if the commment
Like or Dislike:
1
0
[Reply]
BoB
Reply:
December 24th, 2009 at 10:28 am
Here’s how you can do it,
Customizing Theme: The Comment Rating plugin can automatically insert ratings and images into comments. You can also turn off auto-insertion and customize your theme in the “comments.php” file within the “Comments Loop” with the following line.
if(function_exists(ckrating_display_karma)) { ckrating_display_karma(); }
Or ask me to help. http://wealthynetizen.com/donate/customize-your-theme/
Like or Dislike:
1
1
[Reply]
Liking this, but there are certainly a couple of features that would make it even more useful:
- comment voting only possible by moderators, not just for the whole community (if there’s already something out there that exists that does it, I’d love to hear about it, because I can’t find one!)
- ability to change vote: at the moment the IP restriction means you can’t click the thumbs-down to take your vote back down to zero, and vice versa. Mis-clicking is surprisingly easily done…
Like or Dislike:
1
0
[Reply]
Would it be possible to track the ratings by user instead of IP address? In some cases we have multiple users at the same IP address and it does not allow for the 2nd and subsequent rater to uprate a comment.
Like or Dislike:
0
1
[Reply]
BoB
Reply:
June 8th, 2010 at 3:08 pm
This can be done with registered users only. I plan to add that in the next release.
Like or Dislike:
4
1
[Reply]
Jan F
bpicampus.com Reply:
June 9th, 2010 at 11:43 am
Excellent. I only allow registered users to vote anyway so that is not an issue. I am also looking for a plugin that lets a user know who liked their comment and a plugin I can use to help users track the comments a little more closely – for example, new replies to their comments. If you know of any other excellent comment tracking plugins, I would love to hear about them.
Like or Dislike:
2
1
[Reply]
If I may leave a feature request here: I want my user to be able to vote and unvote forever, like on Reddit, because sometimes people change their minds, or notice something the previously overlooked.
Like or Dislike:
1
0
[Reply]
BoB
Reply:
July 3rd, 2010 at 7:08 am
The Pro version allows unrestricted voting.
Like or Dislike:
0
2
[Reply]
I would love to have another selection for Voting fraud prevention. I think for sites that only allow registered users to vote on items that it would be good to prevent votes based on user id. That way a single user no matter if they log in on different machines would be limited on voting on the same comments.
Like or Dislike:
1
0
[Reply]
BoB
Reply:
August 11th, 2010 at 10:14 am
Paul,
Voting for registered users only is available in the pro version.
Poorly-rated. Like or Dislike:
0
3
[Reply]
Paul Lunneberg
pablosbrain.com Reply:
August 11th, 2010 at 11:10 am
I registered and have the pro version but had to modify the voting fraud prevention to record a wordpress user id instead of IP address to ensure registered users couldn’t vote more than once on a comment. Just thought it would be a good addition to add to the base code for the pro version. Like the plugin though! Saved me a ton of time!
Like or Dislike:
2
0
[Reply]
BoB
Reply:
August 11th, 2010 at 11:40 am
Now I see what you mean: Using user ID instead of IP or cookie in voting fraud prevention. I’ll add this to the code. Thanks.
Like or Dislike:
1
0
[Reply]
Great plug-in, but would it be possible to leave the number blank (instead of zero) when there are no like/dislike responses?
Like or Dislike:
1
0
[Reply]
BoB
Reply:
December 2nd, 2010 at 11:14 pm
That’s a good idea. It looks better that way.
I’ll put in the todo list
Like or Dislike:
0
1
[Reply]
Hi. Very nice plugin.
A little suggestion for the plugin:
Add a Facebook Like Button along with the Like/Dislike (Maybe a Tweet to)
Kasper
Like or Dislike:
2
0
[Reply]
BoB
Reply:
December 6th, 2010 at 6:44 pm
Thanks for the suggestion. I need to get up speed with social networking.
Like or Dislike:
2
0
[Reply]
Kasper Solberg
Reply:
December 6th, 2010 at 7:01 pm
I have searched for days now, and all I can find is several plugins that add fb like and tweet to POSTS and PAGES, so you could be the first to add it to COMMENTS!
Like or Dislike:
0
1
[Reply]
BoB
Reply:
December 6th, 2010 at 8:27 pm
that’s an interesting thought. What does it mean to have likes/dislike for a comment? This goes to the commentator, or the author of the post?
Like or Dislike:
0
1
[Reply]
Kasper Solberg
www.fotokonkurrencer.dk Reply:
December 7th, 2010 at 2:18 am
It goes to the commentators fb or tweet profile, tell their friends that they like this comment/post/page. This generates more traffic to the site.
The fb like button is some kind of iframe code. You just need to do some coding that adds the comment url to the iframe code.
Look at the example on my site http://www.fotokonkurrencer.dk
At this moment 36 fb members like my site in general. Some like specific posts too. But nobody is able to ‘like’ the comments
Like or Dislike:
0
1
[Reply]
Kasper Solberg
fotokonkurrencer.dk Reply:
December 7th, 2010 at 2:44 am
Iframe:
Like or Dislike:
1
0
[Reply]
Kasper Solberg
fotokonkurrencer.dk Reply:
December 7th, 2010 at 2:44 am
You should me able to see the code???
Like or Dislike:
1
0
hi, thanks!
how bout if we want to enable comment rating or certain post only, not all posts?
tq
Like or Dislike:
1
1
[Reply]
I want to be able to always show a featured coments before all others. I did this like with the following code. However, the comment rating feature does not render. How can I render my preferred comment with the comment rating feature?
$share_cmt_id_output = get_comment($cmtval);
$content = $share_cmt_id_output->comment_content ;
echo $content;
Like or Dislike:
1
0
[Reply]
Excellent plugin, but I would love to see some extra admin highlighting power built in. I’m specifically thinking about a flame war going on with a lot of heated posts and more value-creating ones being overwhelmed by the others. How about letting admins freeze votes on a line of nested comments? And letting them set a given definitive highlight value to a comment?
Like or Dislike:
1
0
[Reply]
I’m finding that this plugin breaks if you’re using HyberDB. This is because it doesn’t use wordpress’s global database object when working with the db, but rather mysql_query directly. This causes the plugin to use whatever database was last connected to and in the case of a HyberDB enabled site, that’s usually a read only database
Like or Dislike:
0
0
[Reply]
BoB
Reply:
January 19th, 2011 at 10:34 pm
Thanks for reporting the bug. I’ll look into it.
Like or Dislike:
1
0
[Reply]
Not bug but needs to think. Ratings to comments are queried each by its own SQL query:
2943 Query SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1)
2943 Query SELECT ck_ips, ck_rating_up, ck_rating_down FROM `wp_comment_rating` WHERE ck_comment_id = 197
2943 Query SELECT ck_ips, ck_rating_up, ck_rating_down FROM `wp_comment_rating` WHERE ck_comment_id = 198
etc. For optimization I think it should add indexed field post_id and select all ratings to post’s comments by one query – in the same way WP does with comments.
Like or Dislike:
0
0
[Reply]
I want this plugin to work in some of my blogposts instead of the comments. How do I do that`? Very pleased if someone could help me since there are no function like that… i tried wp-likes, wp-ratings,wp-polls…everything… nothing are like this!
Like or Dislike:
0
0
[Reply]
BoB
Reply:
May 23rd, 2011 at 8:05 pm
You may want to try GDStarRating plugin.
Like or Dislike:
0
0
[Reply]
Caroline
makeupedia.se Reply:
May 23rd, 2011 at 10:03 pm
No ive tried it. I just want a simple DONT LIKE – LIKE. And it has to show how many who voted DONT LIKE and who many voted for LIKE. Temptalia.com use one like this!
Like or Dislike:
0
1
[Reply]
Hello. thank you for this great plugin. Is there a way to get overall user thumbs up? not only in just one post..but all together.
Thank you very much.
Like or Dislike:
0
0
[Reply]
BoB
Reply:
June 8th, 2011 at 3:31 pm
Not yet, but can be done.
Like or Dislike:
1
1
[Reply]
We need a way to track what users are voting what. There is one user who is voting every comment down, which is frustrating all of our other users. We don’t want to deactivate the plugin, but we may have to if this continues and we cannot identify the culprit.
Thanks.
Like or Dislike:
2
1
[Reply]
BoB
Reply:
September 28th, 2011 at 3:06 pm
I’ve added this to the to-do list. Thanks for your feedback.
Like or Dislike:
2
1
[Reply]