{"id":9150,"date":"2010-05-14T11:43:15","date_gmt":"2010-05-14T11:43:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/safe-report-comments\/"},"modified":"2018-11-30T07:00:20","modified_gmt":"2018-11-30T07:00:20","slug":"safe-report-comments","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/safe-report-comments\/","author":5279457,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4.1","stable_tag":"0.4.1","tested":"5.0.25","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Safe Report Comments","header_author":"Thorsten Ott, Daniel Bachhuber, Automattic","header_description":"","assets_banners_color":"","last_updated":"2018-11-30 07:00:20","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/safe-report-comments\/","header_author_uri":"http:\/\/automattic.com","rating":3,"author_block_rating":0,"active_installs":200,"downloads":27450,"num_ratings":7,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"3","2":0,"3":"1","4":0,"5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.3","0.3.1","0.3.2","0.4","0.4.1"],"block_files":[],"assets_screenshots":{"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1983035","resolution":"3","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1983035","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1983035","resolution":"1","location":"plugin"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1983035","resolution":"4","location":"plugin"}},"screenshots":{"1":"Simple activation via discussion settings","2":"Amount of reports per comment is shown in comments administration screen","3":"Fits well within most themes without any further action.","4":"Ajax feedback right in place where available."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[107,3737,14005,915,21022],"plugin_category":[44,54],"plugin_contributors":[77494,77514,78260],"plugin_business_model":[],"class_list":["post-9150","plugin","type-plugin","status-publish","hentry","plugin_tags-comments","plugin_tags-flag","plugin_tags-flagging","plugin_tags-report","plugin_tags-report-comments","plugin_category-discussion-and-community","plugin_category-security-and-spam-protection","plugin_contributors-automattic","plugin_contributors-danielbachhuber","plugin_contributors-tott","plugin_committers-automattic","plugin_committers-batmoo"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/safe-report-comments.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/safe-report-comments\/trunk\/screenshot-1.png?rev=1983035","caption":"Simple activation via discussion settings"},{"src":"https:\/\/ps.w.org\/safe-report-comments\/trunk\/screenshot-2.png?rev=1983035","caption":"Amount of reports per comment is shown in comments administration screen"},{"src":"https:\/\/ps.w.org\/safe-report-comments\/trunk\/screenshot-3.png?rev=1983035","caption":"Fits well within most themes without any further action."},{"src":"https:\/\/ps.w.org\/safe-report-comments\/trunk\/screenshot-4.png?rev=1983035","caption":"Ajax feedback right in place where available."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<h3>Customizations<\/h3>\n\n<p>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.\nIn 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 <code>$safe_report_comments = new Safe_Report_Comments(false);<\/code>.<\/p>\n\n<p>Here is an example of a custom setup via functions.php and placing the link comments callback function.<\/p>\n\n<p>In functions.php:<\/p>\n\n<pre><code>\/\/flag comments plugin included in themes' functions.php - disable plugin.\ndefine( 'no_autostart_safe_report_comments', true );\ninclude_once( 'replace-with-path-to\/safe-report-comments\/safe-report-comments.php');\n\/\/ make sure not to auto-attach to comment reply link\n$safe_report_comments = new Safe_Report_Comments(false);\n\n\/\/ change link layout to have a pipe prepended\nadd_filter( 'safe_report_comments_flagging_link', 'adjust_flagging_link' );\nfunction adjust_flagging_link( $link ) {\n    return ' | ' . $link;\n}\n\n\/\/ adjust the text to \"Report abuse\" rather than \"Report comment\"\nadd_filter( 'safe_report_comments_flagging_link_text', 'adjust_flagging_text' );\nfunction adjust_flagging_text( $text ) {\n    return 'Report abuse';\n}\n<\/code><\/pre>\n\n<p>In your custom comment callback function used by wp_list_comments: http:\/\/codex.wordpress.org\/Template_Tags\/wp_list_comments place the following action which will print the link.<\/p>\n\n<pre><code>&lt;?php do_action( 'comment_report_abuse_link' ); ?&gt; \n<\/code><\/pre>\n\n<p>A possible callback function could look like this:<\/p>\n\n<pre><code>function mytheme_comment($comment, $args, $depth) {\n    $GLOBALS['comment'] = $comment; ?&gt;\n    &lt;li &lt;?php comment_class(); ?&gt; id=\"li-comment-&lt;?php comment_ID() ?&gt;\"&gt;\n        &lt;div id=\"comment-&lt;?php comment_ID(); ?&gt;\"&gt;\n            &lt;div class=\"comment-author vcard\"&gt;\n                &lt;?php echo get_avatar($comment,$size='48',$default='&lt;path_to_url&gt;' ); ?&gt;\n                &lt;?php printf(__('&lt;cite class=\"fn\"&gt;%s&lt;\/cite&gt; &lt;span class=\"says\"&gt;says:&lt;\/span&gt;'), get_comment_author_link()) ?&gt;\n            &lt;\/div&gt;\n            &lt;?php if ($comment-&gt;comment_approved == '0') : ?&gt;\n            &lt;em&gt;&lt;?php _e('Your comment is awaiting moderation.') ?&gt;&lt;\/em&gt;\n            &lt;br \/&gt;\n        &lt;?php endif; ?&gt;\n        &lt;div class=\"comment-meta commentmetadata\"&gt;&lt;a href=\"&lt;?php echo htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ?&gt;\"&gt;&lt;?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?&gt;&lt;\/a&gt;&lt;?php edit_comment_link(__('(Edit)'),'    ','') ?&gt;&lt;\/div&gt;\n\n        &lt;?php comment_text() ?&gt;\n\n        &lt;div class=\"reply\"&gt;\n            &lt;?php comment_reply_link(array_merge( $args, array('depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth']))) ?&gt;\n        &lt;\/div&gt;\n        &lt;div class=\"report-abuse\"&gt;\n            &lt;?php do_action( 'comment_report_abuse_link' ); ?&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;?php\n}\n<\/code><\/pre>\n\n<p>Furthermore there are various actions and filters within the script to allow easy alteration of implemented behavior. Please see inline documentation.<\/p>\n\n<h3>Known issues<\/h3>\n\n<p>Automatic mode implementation currently does not work with threaded comments in the last level of threading. As the script attaches itself to the comment_reply which is not displayed once the maximum threading level is reached the abuse link is missing at this point. As a workaround set the threading level higher than the likely amount of threading depth.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download and unzip the plugin.<\/li>\n<li>Copy the safe-report-comments directory into your plugins folder.<\/li>\n<li>Visit your Plugins page and activate the plugin.<\/li>\n<li>A new checkbox called \"Allow comment flagging\" will appear in the Settings-&gt;Discussion page.<\/li>\n<li>Activate the flag and set the threshold value which will appear on the same page after activation<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.4.1 (July 23, 2014)<\/h4>\n\n<ul>\n<li>Typo fix, props spencermorin<\/li>\n<\/ul>\n\n<h4>0.4 (July 23, 2014)<\/h4>\n\n<ul>\n<li>Security fix, h\/t vortfu<\/li>\n<\/ul>\n\n<h4>0.3.2 (Mar. 6, 2013)<\/h4>\n\n<ul>\n<li>New 'safe_report_comments_allow_moderated_to_be_reflagged' filter allows comments to be reflagged after being moderated.<\/li>\n<\/ul>\n\n<h4>0.3.1 (Nov. 21, 2012)<\/h4>\n\n<ul>\n<li>Use home_url() for generating the ajaxurl on mapped domains, but admin_url() where the domain isn't mapped.<\/li>\n<\/ul>\n\n<h4>0.3 (Nov. 7, 2012)<\/h4>\n\n<ul>\n<li>Coding standards and cleanup<\/li>\n<\/ul>","raw_excerpt":"This plugin gives your visitors the possibility to report a comment as inappropriate. After a set threshold is reached the comment is put into moderat &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/9150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=9150"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/automattic"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=9150"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=9150"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=9150"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=9150"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=9150"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=9150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}