[WordPress] 外掛分享: Safe Report Comments

前言介紹

  • 這款 WordPress 外掛「Safe Report Comments」是 2010-05-13 上架。
  • 目前有 200 個安裝啟用數。
  • 上一次更新是 2018-11-30,距離現在已有 2347 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.3 以上版本才可以安裝。
  • 有 7 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

tott | automattic | danielbachhuber |

外掛標籤

flag | report | comments | flagging | report comments |

內容簡介

這個外掛讓您的訪客有機會檢舉不當留言。當檢舉數量達到門檻值時,留言將進入審核階段,審核員會決定是否核准該留言。如果留言被審核員核准,則該留言不再自動進入審核階段,但仍會計算檢舉次數。

自訂化

預設情況下,此腳本會在多數現有佈景主題中正確連結,因為它使用「comment_reply_link」過濾器連結。
如果無法連結,您可以在主題的functions.php檔案中定義no_autostart_safe_report_comments,並通過$safe_report_comments = new Safe_Report_Comments(false);來初始化類別來手動放置旗幟連結。

以下是透過functions.php和放置回調函數來自訂設置的示例。

在functions.php中:

//flag comments plugin included in themes' functions.php - disable plugin.
define( 'no_autostart_safe_report_comments', true );
include_once( 'replace-with-path-to/safe-report-comments/safe-report-comments.php');
// make sure not to auto-attach to comment reply link
$safe_report_comments = new Safe_Report_Comments(false);

// change link layout to have a pipe prepended
add_filter( 'safe_report_comments_flagging_link', 'adjust_flagging_link' );
function adjust_flagging_link( $link ) {
return ' | ' . $link;
}

// adjust the text to "Report abuse" rather than "Report comment"
add_filter( 'safe_report_comments_flagging_link_text', 'adjust_flagging_text' );
function adjust_flagging_text( $text ) {
return 'Report abuse';
}

在wp_list_comments使用的自訂留言回調函數中,放置以下操作以列印旗幟連結

可能的回調函數如下所示:

function mytheme_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>

  • id="li-comment-">


    ' ); ?>
    %s says:'), get_comment_author_link()) ?>

    comment_approved == '0') : ?>





    $depth, 'max_depth' => $args['max_depth']))) ?>





    }

    此外,腳本中還有各種操作和過濾器,使易於更改。

    原文外掛簡介

    This plugin gives your visitors the possibility to report a comment as inappropriate. After a set threshold is reached the comment is put into moderation where the moderator can decide whether or not he want to approve the comment or not. If a comment is approved by a moderator it will not be auto-moderated again while still counting the amount of reports.
    Customizations
    By default this script should hook in just fine in most existing themes as it attaches itsself after the comment-reply link via the comment_reply_link filter.
    In case this does not work out you can place the flagging link manually by defining no_autostart_safe_report_comments in your themes’ functions.php file and initializing the class via $safe_report_comments = new Safe_Report_Comments(false);.
    Here is an example of a custom setup via functions.php and placing the link comments callback function.
    In functions.php:
    //flag comments plugin included in themes' functions.php - disable plugin.
    define( 'no_autostart_safe_report_comments', true );
    include_once( 'replace-with-path-to/safe-report-comments/safe-report-comments.php');
    // make sure not to auto-attach to comment reply link
    $safe_report_comments = new Safe_Report_Comments(false);

    // change link layout to have a pipe prepended
    add_filter( 'safe_report_comments_flagging_link', 'adjust_flagging_link' );
    function adjust_flagging_link( $link ) {
    return ' | ' . $link;
    }

    // adjust the text to "Report abuse" rather than "Report comment"
    add_filter( 'safe_report_comments_flagging_link_text', 'adjust_flagging_text' );
    function adjust_flagging_text( $text ) {
    return 'Report abuse';
    }

    In your custom comment callback function used by wp_list_comments: https://codex.wordpress.org/Template_Tags/wp_list_comments place the following action which will print the link.

    A possible callback function could look like this:
    function mytheme_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>

  • id="li-comment-">
    ' ); ?>
    %s says:'), get_comment_author_link()) ?>

    comment_approved == '0') : ?>


    $depth, 'max_depth' => $args['max_depth']))) ?>

    各版本下載點

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

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


    0.3 | 0.4 | 0.3.1 | 0.3.2 | 0.4.1 | trunk |

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

    • Akismet Anti-spam: Spam Protection 》Akismet會檢查您的評論和聯繫表單提交,將它們與全球垃圾郵件數據庫進行比對,以防止站點發佈惡意內容。您可以在部落格的“評論”管理畫面中檢查評論垃圾郵件的...。
    • Antispam Bee 》用 Antispam Bee 保障你的 WordPress 博客或網站免受評論垃圾郵件的困擾。這個外掛可以有效地阻止垃圾評論和引用,不需要驗證碼,也不會將個人信息發送給第三...。
    • Spam protection, Anti-Spam, FireWall by CleanTalk 》Forms spam filter, Plugin extends spam protection for Gravity Forms. It filters spam submissions for each form created with Gravity Forms., MemberP...。
    • Disable Comments 》Disable Comments Plugin 是一個供管理員完全關閉網站評論功能的工具。我們的外掛程式可以全域性地關閉所有文章、頁面和附件的評論功能,移除所有相關的功能...。
    • Comments – wpDiscuz 》wpDiscuz是一個具有自訂評論表單和欄位的AJAX即時評論系統,旨在加強WordPress原生評論功能。速度超快且具有數十種功能,是Disqus和Jetpack Comments的最佳替...。
    • Disqus Comment System 》Disqus 是網路上最受歡迎的評論系統,被數百萬的出版商信任,以增加讀者參與度、成長觀眾及流量、以及賺取內容。Disqus 協助各種尺寸的出版商直接與其觀眾互...。
    • Cookies for Comments 》這個外掛將會在你的部落格 HTML 的原始碼中新增一個樣式表或圖片。當瀏覽器讀取該樣式表或圖片時,會放置一個 Cookie。如果有使用者在這之後留下評論,該 Coo...。
    • Throws SPAM Away 》這個外掛的開發旨在打擊海外的評論垃圾郵件,目前以下的篩選器被用來判定垃圾郵件。, ・日語篩選(是否包含日語),  只有留言中包含日語字符才能被發布,沒...。
    • Subscribe to Comments 》Subscribe to Comments是一個強大的 WordPress 外掛,讓留言者可以訂閱文章回覆的電子郵件通知。此外掛還包括一個完整的訂閱管理工具,使留言者可以取消訂閱...。
    • Disable Comments 》此外掛完全禁用網站前端和後端的評論功能:, * 隱藏現有評論, * 在前端關閉評論, * 禁用評論、引用通告和Ping的支援, * 重新導向任何試圖訪問評論頁面的使用...。
    • WordPress Native PHP Sessions 》 , WordPress 核心不使用 PHP sessions,但有時您的使用案例、外掛或佈景主題可能需要使用它們。, 此外掛實現了 PHP 的原生 session handlers,後台由 WordPr...。
    • Subscribe To Comments Reloaded 》Subscribe to Comments Reloaded 是一個功能強大的外掛,讓留言者可以訂閱後續評論的電子郵件通知。此外掛還包括一個完整的訂閱管理器,讓留言者可以取消訂閱...。
    • Post-Plugin Library 》Post-Plugin Library 是一個共享代碼庫,並沒有獨立的功能,必須安裝它才能為 Similar Posts、Recent Posts、Random Posts、Popular Posts 和 Recent Comment...。
    • One Click Close Comments 》使用者可以從文章管理頁面(‘編輯文章’)及頁面管理頁面(‘編輯頁面’)中,對於他們有足夠權限進行更改的文章關閉或開啟評論(基本上是管...。
    • No Page Comment 》直到最近,WordPress 提供兩種選擇:你可以默認禁用所有頁面和文章的評論和引用追蹤,或者你可以啟用它們。在WordPress 4.3 版本中,這種情況終於改變,所以...。

  • 文章
    Filter
    Mastodon