Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.2   Updated Sunday, February 22nd, 2009 at 4:16pm

Report Comments Plugin for WordPress

This plugin provides a way for visitors to report inappropriate comments on a WordPress powered site. It does this by automatically adding a link to each comment, which (after asking for confirmation) notifies the administrator by email. There are several options available, including customization of the text, the email message generated (you can choose to include the post title, url, date, author, etc..), and more. Now supports Recaptcha image verification.

Download

  If you have found this page useful, please consider donating. Thanks!

Installation

  • Download and unzip the above file
  • Upload the entire dd-report-comments directory to your plugins directory
  • Activate the plugin from the WordPress admin panel
  • Configure the options under the admin panel: Options – DDReport

Usage

Once activiated, links are added to the comments automatically. The only option you must change is your email address. Other options are available as well, and are explained below.

Change Log

  • 02-22-09 Version 1.2 – Now uses a popup window to report comments. Recaptcha image verification support added, and a few other options. See updated options list below.
  • 06-20-07 Version 1.1 – Added an optional textarea so the personal reporting the comment can include a message.
  • 06-16-07 Version 1.0 – First release.

Options

Link Display Options

Link text – The text shown for the link.

Code before/after link – This allows you to add code around the link for formatting. The default option wraps the link in p tags aligned to the right.

Open in new window – If checked, the confirmation pages will open in a new window.

Email Options

Email address – Where the notifications are sent.

Email subject & message – These options are used to generate the email. You can use the pre-defined tags for this:

%COMMENT_ID% – The ID number of the comment
%COMMENT_URL% – The URL of the comment
%POST_ID% – The ID of the post
%POST_URL% – The URL of the post
%POST_TITLE% – The title of the post
%COMMENT_AUTHOR% – The author of the comment
%COMMENT_DATE% – The date of the comment
%COMMENT_TEXT% – The comment text
%VISITOR_COMMENT% – Optional message from the person reporting this comment

Recaptcha Options

If you do not want to use image verification, leave these options blank.

Otherwise, enter your Recaptcha public and private key (for your domain). If you do not have a Recaptcha account, you can sign up for free at http://recaptcha.net/whyrecaptcha.html

Confirmation Page Options

Confirmation text – The text shown on the confirmation page.

Confirmation button – The text shown on the confirmation button.

Success message – The text shown to the user after the notification has been sent.

Validation error message – If using the Recaptcha image verification option, this is the message that will be shown if the code is not entered properly.

Popup width – The width of the popup window.

Popup height – The height of the popup window.

Troubleshooting

Some servers are configured to only allow PHP to send mail to an email address on the server itself. If you do not receive email sent from this script, try using an email address on the same domain.

Get IP and hostname of form submitters

Open up report.php, and look for this line:

mail($addr, $subject, $msg, 'From: ' . get_option('admin_email'));

Before it, add this:

$msg .= "\n\n" . 'IP: ' . $_SERVER['REMOTE_ADDR'] . "\n" . 'HOST: ' . 
gethostbyaddr($_SERVER['REMOTE_ADDR']) . "\n\n";

And the IP address and hostname of the person who submitted your form will be at the bottom of the email message.

Pages: « 4 3 2 [1] Show All

  1. 15
    Leland

    Sorry if this is a stupid question: would it be hard to convert this into a “Report Post” plugin? Useful for blogs that allow registered users to post.

  2. …If it was set up that way, anytime search engine robots followed the link, etc.. it would trigger emails.

    Why not just add rel=”nofollow” to the links?

  3. Hi, could the plugin be set up to send the IP address of the person who reports the post in the email to the blog admin. This would assist in dealing with those who wish to abuse the facility of reporting posts.

  4. Dave: If it was set up that way, anytime search engine robots followed the link, etc.. it would trigger emails.

  5. 11
    Dave

    I would much prefer if this link just fired of a generic email and then displayed a success message. I hate the way it take you to a big ugly empty page that it completely outside of the normal blog interface. This needs to somehow stay within the blog interface. Please not that new windows are not good usability… and even if you do use the new window option… a user could have their browser configured to open all new windows in a tab… which makes for an even worse user experience.

  6. I am having trouble using this plugin. I keep getting an error message when i try to update the options page in admin. Here is the error:

    
    Fatal error: Cannot redeclare ddrc_add_option_pages() (previously declared in D:\xxxx\xxxx\mydomain.com\wp-content\plugins\dd-report-comments\dd-report-comments.php:38) in D:\xxxx\xxxx\mydomain.com\wp-content\plugins\dd-report-comments\dd-report-comments.php on line 37

  7. Nice plugin, but I suggest to put the Report link in the meta line near the comment author’s name. Also, you may want to use icon instead of the Report word, which is irritating when repeated in hundreds of comments.
    The plugin also breaks rss feed on one of my blogs. The plugin error is shown on the top of the feed:

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/DOMAIN/public_html/BLOG/wp-content/plugins/dd-report-comments/dd-report-comments.php:1) in /var/www/vhosts/DOMAIN/public_html/BLOG/wp-includes/feed-rss2.php on line 2

  8. Awesome! Thanks but i wanna change the place of (report comment). How can i edit it and i wanna open window in javascript. is it hard to change?

  9. Hm, actually I’ve started to get some spam sent in through the report form. Is it possible to maybe have a captcha or some sort of spam protection on it enabled?

  10. Just wanted to say that this is an awesome plugin and I’ve installed it on my blog now. Thanks a bunch!

  11. Very good plugin. I am using it at my website. But the textarea is becoming a good place for spammers. I am getting some 15 emails per day, that don’t have any legitimate complaints but only spam.

    Would be good to add a function to not accept reports with URLs in the textarea.

  12. 4
    Camner

    This sounds like a great plugin. Unfortunately it appears to be incompatible with another plugin I use, WP AJAX Edit Comments. There are other comment editors, so I may look about.

  13. Version 1.1 has been released. It adds a textarea so the person reporting the comment can add an optional message.

    NOTE – if you are upgrading from 1.0, be sure to load the default options (using the button on the options page), because a few of the default option values have changed.

  14. Johan: Support for other character sets is something I plan to look into (for several of my scripts/plugins), but at the moment they are not fully supported.

    Your idea to allow the user to add a comment to the report is very good though – I will add that in with the next release.

  15. 1
    Johan

    Great plugin! Two observations: 1. My blog is in swedish and Ã¥, ä and ö does not show, instead I get wieard letters like: “Är det fler än jag” in the report-mail. 2. Is it posible to let the user that reports a comment get the choise to write a word or two about the reson for reporting?

Pages: « 4 3 2 [1] Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.