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>