這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Rate

描述

Most ratings plugins contain too much code: inline JavaScript, messy markup, weird CSS. Rate is simple, hardly intrusive, and completely overridable.

A Post/Page/Custom Post Type’s rating is the average of all comment ratings. A user can leave a rating when commenting, and change that rating inline after leaving a comment (if logged-in or Cookie’d).

Don’t be afraid to play around and extend the code: drop a rate.css file in your theme directory and mine won’t even load (by default, Rate stars are transparent with a white border, so you can use background-color to set your stars’ colors)!

<?php 
// in this version, you need to insert these functions into your theme for ratings to appear
// you don't have to use the_rating(), the comment_rating() will work by itself, but the_rating() will not

// for a Post, Page, or Custom Post Type (average of all comment ratings)
the_rating();

// for a comment
the_comment_rating();
?>

Read More: http://scottctaylor.wordpress.com/2010/11/30/new-plugin-rate/

螢幕截圖

  • The top rating is an average of all of the comment ratings

  • You can add the_rating() anywhere that has comments attached to it using the Theme editor

  • You can add ratings to comments in the Twenty Ten or any other Theme by adding the_comment_rating() to the custom comment callback located in functions.php using the Theme Editor

  • You can edit the CSS for Rate right in the Plugin Editor. Choose "Rate" from the dropdown, then select rate/css/rate.css to edit the styles right in the Editor

評價

閱讀全部6個評價

貢獻者及開發者

“Rate” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Rate 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.3

  • Added jQuery as a required script – Whoops!

0.2.1.1

  • Whoops, adds second argument to rate_calculate($id = 0, $is_comment = false) for internal purposes

0.2.1

  • the_rating() now excludes ratings from comments that are awaiting moderation. the_rating($id = 0) will not take an argument of ID. Use it to show a rating anywhere.

0.2

  • User can leave a rating while commenting now, can still edit rating inline after comment is posted

0.1.4

  • I broke the rate.css path, oops!

0.1.2

  • Got rid of Divide by Zero warning that PHP was throwing
  • Does not count ratings of Zero or non-ratings in the Average Rating displayed by the_rating()
  • Added screenshots to the Plugin page at WordPress.org

0.1

  • Initial release