[WordPress] 外掛分享: Post Rating and Review

WordPress 外掛 Post Rating and Review 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Post Rating and Review」是 2022-02-11 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 40 個安裝啟用數。
  • 上一次更新是 2022-07-14,距離現在已有 1323 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 3 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

bourgesloic |

外掛標籤

vote | rating | review | rate post | custom post |

內容簡介

「Post Rating and Review」外掛提供了連接訪客評論您創建的文章或文章類型(自定文章類型)的功能。您可以自己定義評分標準。

您可以使用以下 2 種方式使用此外掛:

全功能啟動(評分 + 評論):讓您的使用者評分並留下評論
僅啟用評分:當您希望使用者留下評分但不需要收集他們的意見反饋時

這些功能主要是使用短代碼實現,因此無需開發。 外掛已經集成了三個短代碼,可顯示三個不同的小工具:

「設置評分」小工具,讓訪客對文章進行評分
「顯示評分」小工具,可顯示文章的整體評分
「評分圖表」小工具,顯示文章的整體評分以及評分標準的統計

啟用評論管理將自動在單篇文章頁面的評論列表上方顯示「評分圖表」小工具,無需使用短代碼。 此外,您可以在同一頁面上集成其他小工具,例如在頁面頂部顯示「顯示評分」小工具。

此外掛還包括管理電子郵件通知的功能,以通知文章作者提交了一篇新的文章評論。

此外掛集成了 Schema.org 評分規範:當您顯示文章的整體評分(「aggregateRating」類型)時,將自動生成微數據。

重要一點:在此版本中,插件僅允許連接到您網站的訪客進行評分,這對於管理網站上的評論來說是最好的選擇。 但是,如果需要,將來的更新可能會集成非連接訪客的評分和評論管理。

我開發此外掛是為了自己的使用,然後盡可能使其可配置,以便讓其他人使用。 如果您缺少某些功能,請隨時與我聯繫。我不能保證能夠為您將其整合到未來的版本中,但試試也沒有妨!

外掛選項概述

您可以訪問和自定義以下參數:

評分小工具通用設置

評分最高值(整數):訪客可以分配的最高評分(通常為 5)
默認星星大小:小工具中顯示的星星的像素大小。可以在調用短代碼時修改此參數。
設定評分的步驟:訪客分配評分的精度(建議為 0.5 或 1)
星星的顏色:所有小工具中顯示的星星的顏色
小工具圖表條形的顏色:詳細評分圖表中的條形的顏色
懸停在小工具圖表條形上時的顏色:滑鼠移動到詳細評分圖表中的條形上時的顏色
突顯用戶擁有的評論的顏色:用於突顯設定過評分的連接用戶擁有的評論的邊框顏色

評分顯示設置

顯示星星後的整體評分:如果選擇是,短代碼整體評分(prar_display_rating_for_post)將在星星後以純文本顯示評分。
顯示評分人數後的星星:如果選擇是,短代碼整體評分(prar_display_rating_for_post)將在星星後顯示評分人數。
用戶評分下方顯示的文本:當連接用戶已經評分時,表示顯示在用戶評分下方的文字(短代碼 prar_set_rating_for_post)。例如,「您的評分是 {note}」中的 {note} 會被用戶給的評分替換。

原文外掛簡介

The “Post Rating and Review” plugin offers the possibility to connected visitors to review posts or types of posts that you have created (custom post types). You may define the rating scale yourself.
You can use the plugin in 2 ways:

Full activation of reviews management (rating + comment): to allow your users to rate AND leave a comment
Enabling rating only: when you want your users to leave a rating but you don’t need to collect their feedback

These features are mainly usable with shortcodes, so without development. Three shortcodes are integrated into the plugin allowing the display of 3 different widgets:

the “set rating” widget which allows a visitor to leave a rating for a post
the “display rating” widget which allows you to display the overall rating of a post
the “rating chart” widget which displays the overall rating of a post as well as a breakdown by rating scale

Enabling review management will automatically display the “rating chart” widget above the list of comments in a single post page without the need of a shortcode. Additionally, you can integrate other widgets on the same page if you wish (for instance, a widget “display rating” at the top of the page).
The plugin also includes functionalities to manage email notification to posts authors when a new review of their post is submitted.
This plugin integrates schema.org specifications on ratings: microdata will be automatically generated when you display the overall rating of a post (“aggregateRating” type).
An important point: in this first version, the plugin allows rating only for visitors connected to your site, which seems to us to be the best choice to manage reviews on a website. Nevertheless, a future update may integrate the management of ratings and reviews by non-connected visitors if needed.
I developed this plugin for my own use and then made it as configurable as possible so that it could be used by others. Do not hesitate to contact me if you are missing certain features. I can’t promise you that I will be able to integrate them into a future release for you, but it doesn’t hurt to ask!
Overview of plugin options
You can access and customize the following parameters:
Rating widget general settings

Rating max (integer): maximum rating that a visitor can assign (usually 5)
Default star size: size in pixels of the stars displayed in the widgets. This parameter can then be modified when calling a shortcode.
Step for rating set: precision for the visitor to assign a rating (I recommend 0.5 or 1)
Color for stars: color of the stars displayed within all widgets
Color for widget chart bar: color of the chart bar in the detailed rating chart
Color for widget chart bar (hover): color of the chart bar when cursor hovers in the detailed rating chart
Color to highlight user owned review: color of border to highlight connected user owned review

Rating display settings

Display overall rating after stars: if yes, the shortcode overall rating (prar_display_rating_for_post) will display the rating in plain text after the stars.
Display number of ratings after stars: if yes, the shortcode overall rating (prar_display_rating_for_post) will display the number of ratings after the stars.
Text displayed below user’s rating: indicates the text displayed below a user’s note when the user has already rated (shortcode prar_set_rating_for_post). The text {note} will be replaced by the rating given by the user.

Rating recording settings

Text displayed after rating update: this text will be displayed under the widget when the visitor validates his rating (shortcode prar_set_rating_for_post). After a few moments, this text will disappear and be replaced by the text defined in “text displayed below the user note” option field.
User can change rating after submission?: if yes, the visitor can modify his rating even after submission. If not, the visitor will be able to modify his note as long as he does not leave the page; if he leaves the page and then returns, the rating will no longer be editable.
Save overall rating and number of ratings in post meta? : if yes, the overall rating as well as the number of ratings will be updated in the meta of the post that the visitor rated. You can then choose the name of the fields that will be saved (meta_key in the postmeta table) and what type of meta you want to use (Meta WordPress as standard, ACF field if you use ACF and you have created a custom field to store these values ).

Reviews management settings
Enable review management? : if yes, the management of reviews will be activated. Then choose the type or types of post for which you want to activate this management of reviews. Then indicate which fields are mandatory for a visitor to be able to submit their review (N.B. at least one of the 2 fields must be selected as mandatory).
You can also indicate if a review author have the possibility to modify and/or delete its review (N.B. it applies until review has not been answered). Last, you can allow modifying review in WP backoffice by another user that review author.
Email notifications settings

Send an email to the post author when a new rating is submitted: useful when you do not use review management functionalities. Selecting “yes” will enable sending a notification email to the post author when a rating is submitted by a visitor through the plugin shortcode.
Send an email to the post author when a new review is posted: WordPress includes a notification email to post authors for new comments. If you select “yes”, WordPress standard email is customized and includes the rating submitted by the reviewer.

Tools

By clicking on the “Start database reset” button, all datas stored by the plugin will be erased. This can be useful in the development phase to test your site and dump the data from your tests before going live.

Rating Management Shortcodes
Three shortcodes display a Rating widget. You can integrate these shortcodes in several ways: in the Gutenberg editor, in the Classic Editor, in a widget or even directly in your templates.
You can also integrate several rating widgets on the same page: for example, if you integrate the shortcode at the top and bottom of the page, the validation of the rating with one of rating widgets will trigger the update of the other widgets present on the page.
1. Shortcode to give a rating
[prar_set_rating_for_post]

Optional parameters accepted in the shortcode:

post_id (numeric): id of the post that will be rated by the visitor. If the parameter is not specified, the plugin will use the active post.
size (numeric): size in pixels of the stars displayed. By default, uses the size defined in the plugin options.
step (numeric > 0 and <= 1): by default, uses the value indicated in the options of the plugin. readonly (true/false): displays the read-only widget that cannot be modified by the visitor. This can be useful to show the visitor the rating he gave to a post (for example in a My Account section). class (text): css class that will be added to the widget to facilitate formatting customization external_id (numeric): this is the id of a post attached to the post_id you specified. Example of use: you have created two types of posts “Books” and “Writers”, each book being attached to a writer. You call the shortcode for a book and you provide the writer’s post_id in the “external_id” parameter. The plugin will store the writer’s id along with book’s post id. It will allow you to display the writer’s overall rating on his page: this rating will be based on all of his books that have been rated by visitors on your website . update_after_vote (false / true): by default filled by the value indicated in the options of the plugin. If false, visitors will not be able to change their rating once they leave the page. When visitors return to the page, they will see the rating they gave but will not be able to modify it. If true, the note will be editable at any time by the visitor. Example: [prar_set_rating_for_post post_id="153" step="0.5" size="32" update_after_vote="false"] 2. Shortcode to display overall rating [prar_display_rating_for_post] Optional parameters accepted in the shortcode: post_id (numeric): id of the post for which you want to display the overall rating. If the parameter is not specified, the plugin will use the active post. size (numeric): size in pixels of the stars displayed. By default, uses the size defined in the plugin options. step (numeric > 0 and <= 1): by default, uses the value indicated in the options of the plugin. display_compteurs (true/false): if true, the overall rating as well as the number of ratings will be displayed next to the widget. class (text): css class that will be added to the widget to facilitate formatting customization user_id (numeric): if the id of a user is indicated then the behavior will depend on the post_id and external_id parameters. Below are the different cases: user_id filled in alone: ​​the widget will display the overall rating of a given user (average of all his ratings) user_id with post_id: the widget will display the rating given by the user to the post user_id with external_id: the widget will display the overall rating of all ratings given by the user and linked to this external_id. external_id (numeric): this is the id of a post attached to the post_id you specified (cf. shortcode prar_set_rating_for_post). If filled in alone (without user_id or post_id), then the widget will display the overall rating of all ratings assigned to this external_id. Example: [prar_display_rating_for_post post_id="153" size="32" display_compteurs="true"] 3. Shortcode to display overall rating + detailed rating chart [prar_display_rating_chart_for_post] Optional parameters accepted in the shortcode: post_id (numeric): id of the post for which you want to display the widget. If the parameter is not specified, the plugin will use the active post. size (numeric): height in pixels of the horizontal bars used to represent the number of notes per note scale. class (text): css class that will be added to the widget to facilitate formatting customization Example: [prar_display_rating_chart_for_post post_id="153" size="20"] Overview of reviews management Managing reviews consists of associating a rating with a comment. The reviews management uses WordPress commenting functionalities: therefore, comments must be activated for the types of post for which you want to activate reviews. Thanks to the use of standard WP features, the settings you specify for comments will automatically apply to reviews (manual approval of comments, notification messages, automatic moderation, etc.). The settings that will not apply to review management are: “Users must be registered and logged in to comment”: currently the plugin only accepts reviews for logged-in visitors. Regardless of your choice for this option, only logged-in visitors will be able to leave a review. Enable threaded (nested) comments N levels deep: in the plugin, only administrators will be able to respond to a review via the WordPress admin screens. Visitors – logged in or not – will not be able to respond to a review. To enable reviews, indicate “yes” in the plugin options (“Reviews management settings” section) then select the post types for which you want the review management features to be automatically implemented. When you activate this management of reviews, the standard “Comments” area will be replaced by a plugin owned template (“post-reviews.php”) which is located in the “includes/template” folder of the plugin. You can also customize this template by copying it into a “prar-rating” folder in your theme. This template displays the overall rating, the detailed rating chart, the list of reviews already published as well as a button allowing a visitor to leave a new review. This button is active if the visitor is logged in and has not already left a review on the post. The writing of the review by the visitor is done in a popin which combines the rating attribution and the comment left by the visitor. Via the options of the plugin, it is possible to determine if the note and/or the comment are mandatory to leave a review. Reviews left by users will be visible in admin in the standard WordPress comments list as well as on the post editing page. Overview of email notifications management You can activate a functionality which will send emails to post authors each time a new rating or a new review of their post is submitted. How it works Notification of new review: email sending is based on WordPress standard functionality. Email content and subject are customized through a txt template named email-author-notification-new-review_en_US.txt (en_US can be changed with your locale if you want to translate it to your language). When manual approbation on comments is activated, the notification email is sent to the post author as soon as the review is approved in WordPress admin. Important notice: WordPress does not send the notification email when the user who did approve the review is also the post author. In the same logic, WordPress does not send the email when the review author is also the post author. Notification of new rating: this functionality is almost the same as the notification’s for new review. It is useful when you do not use these plugin review management functionalities (i.e. you just use the shortcodes as a standalone). The txt template of this email is email-author-notification-new-rating_en_US.txt. Both emails are in plain-text format. You can customize these emails copying txt template in a “prar-rating” folder in your theme directory, then change the locale if you need (for instance, email-author-notification-new-rating_de_DE.txt if your website is in german language). Text between {} shall not be changed: it will be replaced dynamically by values when the email is generated. For Developers Several hooks are available for developers as well as callable functions: Actions prar_rating_before_save_note Called before saving rating to database Parameters: post_id, user_id, note, external_id prar_rating_after_save_note Called right after saving rating to database Parameters: post_id, user_id, note, external_id prar_rating_tpl_reviews_begin_header Called in the post-reviews.php template just before the section title Parameter: none prar_rating_tpl_reviews_before_add_review Called in the post-reviews.php template just before the “Add a review” button Parameter: none prar_rating_tpl_reviews_after_add_review Called in the post-reviews.php template just after the “Add a review” button Parameter: none prar_rating_tpl_reviews_end_header Called in the post-reviews.php template at the end of the header Parameter: none prar_rating_tpl_have_reviews_start Called in the post-reviews.php template just before the list of reviews (when there are reviews) Parameter: none prar_rating_tpl_have_reviews_end Called in the post-reviews.php template just after the list of reviews (when there are reviews) Parameter: none prar_rating_tpl_no_reviews_start Called in the post-reviews.php template just before the list of reviews (when there are no reviews for the post yet) Parameter: none prar_rating_tpl_no_reviews_end Called in the post-reviews.php template just before the list of reviews (when there are no reviews for the post yet) Parameter: none Filters prar_rating_sc_set_note_atts Allows to override the parameters indicated during the call to the shortcode prar_set_rating_for_post Parameter: array atts prar_rating_text_save_user_note Allows to override the text displayed to the visitor when the rating is saved with the prar_set_rating_for_post shortcode. Default text is set in plugin options Parameters: initial text, note, post_id prar_rating_text_user_note Allows to override the text displayed to the visitor next to his rating in the prar_set_rating_for_post shortcode. Default text is set in plugin options Parameters: initial text, note, post_id prar_rating_html_block_user_note Allows to modify the html block which is after the rating in the prar_set_rating_for_post shortcode. Parameters: initial html block, note, post_id prar_rating_html_block_display_note Allows to modify the html block displayed after the widget in the shortcode prar_display_rating_for_post Parameters: initial html block, array with overall note information (number_of_notes, note, sum_notes) prar_rating_notification_new_review_email_subject Allows to customize email subject of new review notification email sent to post author Parameters: subject, comment (object) prar_rating_notification_new_review_email_header Allows to customize email headers of new review notification email sent to post author Parameters: header, comment (object) prar_rating_notification_new_rating_email_subject Allows to customize email subject of new rating notification email sent to post author Parameters: subject, blogname, post (object), rating (array) prar_rating_notification_new_rating_email_sender Allows to customize email sender of new rating notification email sent to post author Parameters: sender, blogname, post (object), rating (array) prar_rating_notification_new_rating_email_from Allows to customize email from (in header) of new rating notification email sent to post author Parameters: from, blogname, post (object), rating (array) prar_rating_notification_new_rating_email_header Allows to customize email header of new rating notification email sent to post author Parameters: header, blogname, post (object), rating (array) prar_rating_can_review_be_updated Indicate if a review can be updated by the review author Parameters: can_be_uptdated (boolean), comment (object) Functions prar_rating_get_average_note_for_post Returns the overall rating for a post, user, external_id as an array (number_of_notes, note, sum_notes) Parameters: post_id, user_id, external_id prar_rating_get_average_note_for_user Returns the overall rating given by a user as an array (number_of_notes, rating, sum_notes) Parameter: user_id prar_rating_get_average_note_for_external_id Returns the overall rating for an external_id as an array (number_of_notes, rating, sum_notes) Parameter: external_id prar_rating_get_all_notes_for_user Returns an array with one line per rating assigned by a user (post, user_id, rating, external_id, date) Parameter: user_id prar_rating_get_all_notes_for_post Returns an array with one row per rating assigned for a post (post, user_id, rating, external_id, date) Parameter: post_id prar_rating_get_all_notes_for_external_id Returns an array with one row per rating assigned to an external_id (post, user_id, rating, external_id, date) Parameter: external_id JavaScript trigger("prar_rating_saved") An ‘prar_rating_saved’ event is generated related to the DOM element that carries the widget. This allows you, if necessary, to trigger specific actions in your website when assigning a rating. N.B. this event is generated when the note is saved in a "prar_set_rating_for_post" widget. It is not generated as part of the management of reviews for which the note is recorded after validation of the complete form. event listener prar_rating_display_stars If your page is generated through ajax and includes the plugin shortcode, you must trigger this event in order to display the stars icons. Trigger the event after having made changes in DOM through your ajax function. Special thanks The development of this plugin was greatly facilitated by “RaterJS” javascript library developed by Fredrik Olsson. Many thanks also to Eric for his valuable design advices and feature ideas.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Post Rating and Review」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 1.0.1 | 1.1.0 | 1.1.1 | 1.2.0 | 1.2.1 | 1.2.2 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | trunk |

延伸相關外掛(你可能也想知道)

  • Crowdsignal Dashboard – Polls, Surveys & more 》Crowdsignal Dashboard外掛讓您能夠在WordPress管理區內創建和管理投票、調查、測驗和評分。您可以在同一個地方查看所有專案,包括在Crowdsignal.com上建立的...。
  • WP-Polls 》WP-Polls 是一個高度可自訂化的外掛,可以透過模板和 CSS 樣式來製作,同時提供豐富的選項,確保 WP-Polls 可以按照您的需求運行。現在支援多個答案的選擇。,...。
  • WP-PostRatings 》使用方法, , 開啟 wp-content/themes/<你的主題名稱>/index.php, 你也可以將它置放在 archive.php、single.php、post.php 或 page.php 中, 尋找:<?...。
  • Poll Maker – Versus Polls, Anonymous Polls, Image Polls 》WordPress 投票外掛, , WordPress 投票外掛價格, 投票軟體免費試用版, 投票軟體專業版試用版, 投票軟體專業版使用手冊, , WordPress 投票外掛是一款容易且迅...。
  • Democracy Poll 》這個外掛提供了一個方便且聰明的系統,可以創建具有不同功能的各種投票,例如:, , , 單一和多重投票。可自定義。, 訪客可以添加新答案。可自定義。, 可以設...。
  • Like Button Rating ♥ LikeBtn 》「Like Button Rating」外掛可以讓您在以下地方加入一個看起來很酷、且完全可客製化的 Like 按鈕:, , 文章, 頁面, 留言, WooCommerce 產品, BuddyPress 活動...。
  • Rating-Widget: Star Review System 》on of Rating-Widget是最受歡迎的符合GDPR的五星級評論系統。該系統提供易於使用的評分功能,包括對文章、頁面、評論、WooCommerce、BuddyPress 和 bbPress ...。
  • TotalPoll for Polls and Contests 》TotalPoll 是一個 WordPress 投票外掛,可透過投票和競賽有效地獲得觀眾即時反饋。, TotalPoll WordPress 投票外掛, TotalPoll 是一個強大的 WordPress 投票...。
  • Kodex Posts likes 》"Kodex Posts Likes" 外掛可讓您的訪客和已登入使用者對您的文章、頁面和自訂文章類型按讚或按不喜歡。, 此外掛使用 AJAX 介面,介面乾淨且完全可自訂。, 按...。
  • GD Rating System 》GD Rating System 是 GD Star Rating 外掛的接班人,但與舊版外掛沒有任何相似之處。GD Rating System 使用模組化結構,大多數功能都分成插件和評分方法兩種...。
  • Simple Rating 》目前正在開發 2.0 版本。如果您希望在此版本中看到某些功能,請創建討論串並告訴我您的想法。, 2.0 版本的異動紀錄, 簡單評分外掛,具備少量的功能。, 功能:...。
  • Polls CP 》tion of Polls CP provides a detailed analysis of the poll results. The reports include graphic and printable reports, as well as automatic email re...。
  • bbPress Voting 》這款簡單而強大的外掛與 bbPress 論壇外掛整合,新增了一項功能,使用戶或訪客可以對主題和回覆進行投票,每個主題和回覆都有一個總分數,分別有上箭頭和下箭...。
  • Idea Factory 》Idea Factory是出於需求而誕生的,而且源於缺乏可以按我的要求完全執行的外掛程式而產生的挫敗感。該外掛允許使用者從前端提交新的想法並對其進行投票。目前...。
  • Voting for a Photo 》在 WordPress 圖庫中添加照片投票功能。, 功能, , 防止使用 IP、Cookies 作弊投票, 設定單人投票數量限制, 為響應式圖庫添加樣式, 使用簡單, 。

文章
Filter
Apply Filters
Mastodon