Rate-in-Place 1.0

Now you can not only display a rating for each one of the Links in your Blogroll, but you can update the rating right from the front page (logged-in with editing privledges, of course) with AJAX!

Current Version:

Rate-in-Place, Version 1.0
Designed for WordPress 2.0.3

Demo:

I install most of the plugins I create on my own blog. In this case, you can see the rating below each link in my blogroll, but you’d have to be an admin to see rating it in action!

Features:

  • rate links without refreshing or leaving the page
  • works in current versions of Firefox, Internet Explorer, Opera, Netscape, and Safari.

Recommendations:

  • perfectly compliments the feedwordpress feed aggregator plugin.

License:

No license; just trying to help out the WordPress community. Feel free to implement for smooth AJAX link rating functionality via Prototype whenever you like. All I ask is that you leave a comment/trackback here so others can see your implementation.

Download:

.ZIP package: rate-in-place-1.0.zip

Plugin Installation:

  1. Unzip/upload to /plugins directory.
  2. Activate via WordPress Plugins tab.
  3. open /wp-includes/links.php and insert the following code at line 255:

    if ($show_rating)
    $output .= rip_link_rating($row->link_ID, $row->link_rating);

  4. in the same file, on line 194, change this code:

    $sql = "SELECT link_url, link_name, link_image, link_target, link_description, link_rating, link_rel $length $recently_updated_test $get_updated FROM $wpdb->links WHERE link_visible = 'Y' " . $category_query;

    to this:

    $sql = "SELECT link_ID, link_url, link_name, link_image, link_target, link_description, link_rating, link_rel $length $recently_updated_test $get_updated FROM $wpdb->links WHERE link_visible = 'Y' " . $category_query;

  5. OPTIONAL: Each of your Link Categories have a setting whether to Show Rating or not, which can be modified from inside the WordPress Links > Link Categories tab. This is checked by default so most of the time you won’t have to worry about it.

Prototype Installation:

  1. Download/unzip/upload the latest version of Script.aculo.us (currently 1.6.1) to /wp-includes/js/scriptaculous
    make sure prototype.js (comes with Script.aculo.us) is in there, as well.
  2. Include prototype.js in your theme’s header.php, like so:

    <script type="text/javascript" src="/wp-includes/js/scriptaculous/prototype.js"></script>
Useful? Share it with your friends:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Ma.gnolia
  • MySpace
  • Reddit
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Rate this post:
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 3.40 out of 5)
Loading ... Loading ...

8 Responses to “Rate-in-Place 1.0”

  1. Jordy says:

    Looks cool, Mike. It sounds like one of my favorite features of Netflix, being able to rate movies right on the page by clicking on the star you want. I think you should also adapt it so that blog readers can rate comments (ala slashdot or digg), then set a viewing threshold. That would be huge, IMHO.

    Good stuff man.

  2. Paul Chaney says:

    Contact me at my email addy about a project I may want you to work on for integrating a link ranking system for readers to use with our WP blog. It would be similar to the one you’ve created, but would allow readers to rank a link without having to login or be given admin privileges.

    Thanks,

    Paul Chaney
    Blogging Systems LLC

    PS: The form on your contact page is not working. There is no verfication in place there, and when I submitted my comment received an error message.

  3. Ken Savage says:

    Awesome widget thx man.

  4. [...] Mike Smullin’s Rate-In-Place widget provides an interface for the blog admin to rate blogroll links right on the front page. This is a nice way to bring back this little-used WordPress feature. [...]

  5. Sweet plugin, good job !!!

  6. Bob Smullin says:

    Thought I`d chex out your heritage

  7. Estetik cerrahi says:

    Thanks for plugin.. Great site.

Leave a Reply