Five Star Rating

This simple WordPress plug-in allows viewers to rate a post.

jQuery showMessage

This jQuery plug-in allows you to easily create a 'twitter-like' notification.

Web Tips

Sharing our knowledge of CFML & jQuery and many other web development tips.

Contestant Rating WordPress Plugin

23
By admin in : Plugin, Wordpress // Mar 16 2010

This plugin is no longer being developed.


This information is for archive purposes only. We have replaced this plugin with an improved version called Five Star Rating which can be found here.

This is our first wordpress plugin and although we did not write this from scratch (we ported over a previous plugin that only worked in FireFox), we did improve upon a previous product and made it our own.

The plugin requires jQuery and if it is not included, it should load it for you. The most recent version is 0.4.

Download contestant-rating ver. 0.4[25 KB zip]

The original upload had the wrong /js/ files in it, so have updated the download here.

About the Author

admin has written 26 articles for dingobytes.

Andrew Alba is a Software Engineer who resides in the Minneapolis-St Paul since 2010. Andrew has almost a decade and a half of web development and advertising experience. Andrew is currently employed with The Lacek Group in Minneapolis, MN after spending almost three years with Internet Broadcasting in St Paul, MN and five years with Interive Media Group in Fargo, ND. Andrew enjoys developing solutions using CFML, JavaScript/AJAX, Java, PHP and anything else he can steal from the web.

23 Responses to "Contestant Rating WordPress Plugin"

  1. B. April 11, 2010 5:44 pm

    [ADMIN NOTE: THIS DOES WORK in wordpress 3.0 beta but there is a bug which is addressed in version 0.4]
    Thanks but it doesn’t work with wordpress 3.0 beta.
    When I click on the stars to cast my vote the counter stays the same. Also, it looks very strange: http://i39.tinypic.com/1sifps.png
    Are you going to update it? I really like this plugin.
    I’ll be happy to provide more infos.

  2. Clyde April 15, 2010 7:00 am

    The plugin is not working on Version 2.9.2 too… Too bad.

  3. karacsi_maci May 26, 2010 5:54 am

    This plugin is not works :(
    I had Post Star Rating, i try this to fix IE bug, but this is worth than the PSR plugin:

    The CS Rating appear only Chrome, not in IE, FF, Opera, Safari.
    CR_bests_of_month() and others are mess up with overlayed divs, etc…

    WordPress 2.9.2, as Clyde sad, it is too bad.
    Fix these errors please.

  4. admin May 26, 2010 1:18 pm

    Thank you for the comment.

    I am unable to recreate any issue in IE. What version of IE are you using? What doctype are you using?

  5. Steve May 28, 2010 6:15 am

    This plugin is not works :(
    I had Post Star Rating, i try this to fix IE bug, but this is worth than the PSR plugin:

    The CS Rating appear only Chrome, not in IE, FF, Opera, Safari.
    CR_bests_of_month() and others are mess up with overlayed divs, etc…

    WordPress 2.9.2, as Clyde sad, it is too bad.
    Fix these errors please.

  6. Emily June 1, 2010 3:14 am

    The plugin is not working on Version 2.9.2 too… Too bad.

  7. R. June 5, 2010 12:08 pm

    The same problem.
    Has started to work, when in \contestantRating.min.js\ has changed \jQuery.get(\/wordpress/\ to \jQuery.get(\http://www.somepage.etc/wordpress/\.

  8. SZ July 27, 2010 12:31 pm

    does it work for wordpress 3?

  9. admin July 27, 2010 5:31 pm

    Yes, it does work in WP 3

  10. Michael Thimmesch August 9, 2010 2:34 pm

    I have installed your plugin and have built a page to use it on…but I can’t find where you go in the WP admin system to load/install/use the Contest Rating plugin on a blog post or a page. What am I missing? Where do I go? I have WP 3.0.1 installed.

  11. admin August 14, 2010 9:07 am

    Sorry for the late reply.

    Once you have installed and activated the plug-in, you need to place the following code in your theme template where you want it to appear.

    < ?php CR_show_voting_stars(); ?>

    You can get as crazy as you want with it. In my example, I only want it on posts (not in pages) so I have placed the code on the ‘Main Index Template (index.php)’ of my template. The code looks like this:

    < ?php the_content('Read More'); ?>
    < ?php
    $posttags = get_the_tags();
    if ($posttags) {
    foreach($posttags as $tag) {
    $showStars=$tag->name;
    if ($showStars == 'contestant-rating') {
    CR_show_voting_stars();
    //CR_bests_of_month();
    CR_bests_of_moment();
    }
    }
    }
    ?>

  12. Max August 19, 2010 11:31 am

    I’m actually running into the same problem with WP3.0
    The plugin shows the stars, however clicking it does nothing. Votes are not registering. I’m thinking this is a jquery issue. What version of jquery are you running?

  13. Max August 19, 2010 12:30 pm

    We figured out the problem.
    In contestantrating.js, there was a reference on line 41 that basically breaks on any WP install in a subfolder. SO…. it works fine with WP installed at base dir, but no subfolders.

    Hope that helps for future releases.

  14. admin August 19, 2010 12:53 pm

    YOU ARE AWESOME MAX! Thank you for finding that for me. I will get that corrected shortly.

  15. Max August 21, 2010 10:38 am

    No problemo. If I had a nickle for every bug in my WordPress Themes I’d have a lot more than the donations people have sent. HA!

    Speaking of which, you need a donate button.

    Thanks for the plugin. I’m using it in an adidas project. if you email me your shoe size and address I can see about hooking you up.

  16. Zim French August 24, 2010 1:32 pm

    I’ve chosen your plugin to be able to use it in the loop of template.

    Everything works, without once voted, all rates of posts are updated on the page…

    Do you have an idea?

  17. admin August 24, 2010 1:49 pm

    I am not exactly sure I understand the issue. I think what you are saying is that you see the ratings and then once you vote it stops working?

    The plugin uses a cookie (and currently the cookie is set to some absurd amount of time like one year) to track votes. You can manually change this by editing the cr.class.php file.

    If you look at the bottom of that file, there is a line of code
    setcookie('wp_cr', $this->_user, time()+60*60*24*365, '/');
    where time()+60*60*24*365 sets cookie to one year (60 seconds * 60 minutes * 24 hours * 365 days).

    If you want to limit the votes to once per evert 5 minutes you could replace that line with something like this
    setcookie('wp_cr', $this->_user, time()+60*5, '/');

    If I am incorrect about this, please try to give me a specific example or url.

    I am working on a large change to the plugin at this time which will not require template changes, will allow you to setup cookie expiration times, etc.

    Hope that helps.

  18. Gary September 24, 2010 5:03 pm

    Where is the rating data held and how can you delete/reset the results ?

    Thanks for a great plug-in.

    Gary

  19. admin September 25, 2010 7:30 pm

    Thank you Gary. The data is stored in the WordPress database in two tables wp_fsr_post and wp_fsr_user (assuming you’re using the default wp_ prefix to tables). You will need to manually delete or reset the results in the database.

  20. dudd January 3, 2011 4:20 pm

    hi, this plugin do not work with no registred (guest) visitors !

  21. admin January 3, 2011 4:33 pm

    Ah, but it does work! Although this plug-in is not being developed anymore (replaced with the Five Star Rating WordPress Plugin), we know this works even if someone is not registered. Try using Five Star Rating Plugin and if you have problems, use the FSR FAQ to resolve your issue.

  22. Luke November 10, 2011 7:10 am

    Hi, is there a way of seeing any stats for these ratings? It would be good to see how many people have rated my articles and which ratings articles have been given.

    Thanks!

  23. Anonymous November 10, 2011 7:15 am

    There are, but only on the front end (nothing in the admin yet).

    See the other notes in the Readme.txt file.

    [FSR_best_of_month] and [FSR_all_time_best]

Leave a Reply

 
You must be logged in to post a
video comment.