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. Hi there!

    How can i move the “Report link” to another position in the comments. Now the link is in the bottom/end of the comment text but i want it to appear in the end of the line whit the author and time for the post. Look on this post on my page http://www.larm-soderhamn.se/?p=2874 . The report link is now in the end and is named (Anmäl denna kommentar).

    Regards Daniel S

  2. Version 1.2 Released

    When a link to report a comment has been clicked, the form now opens in a popup window. Support for Recaptcha image verification has been added as well (if you choose to use it). This helps prevent spam bots from trying to submit the form.

    For those of you unfamiliar with Recaptcha, all you have to do is sign up for a free account for your website (info is above, and in the plugins options page).

    Other options have been added to specify the error message shown when the code is not entered properly, and to define the width and height of the popup window.

    This plugin has been tested in the latest release of WordPress (2.7.1)

  3. Does this plugin work with WP 2.7?

  4. Hi
    I need something like this. I need a post reporter. or a link under codes (CODES) for reporting dead links.

    Thank you anyway…

  5. I had the same problem as Martin, it worked great in FireFox but in IE7 I clicked the link to report a comment and it gave me a page not found error. I love the functionality but if it doesn’t work with IE that’s a big problem.

  6. 25
    jackburton

    great plugin! i’m using it extensively on one of my sites. the problem is, i’m now getting SPAM REPORTS! yes, that’s right, from spam bots using the link to spam me. is there any way to prevent this? like include a captcha-like addition in any upgrades so only a human being can use it? thanks, and again, great plugin!

  7. 24
    Andrew

    Can we have this updated for 2.5? Its such a cool idea!

  8. 23
    Martin

    It doesnt work with IE someone know why? … Te (Report Comment) apears but if u press it the page has an error….

  9. 22
    Martin

    Hi, this is a great plugin im traing to use it on WP MU . Is it posible to chanche the Email address for each blog en WP . i.e. Send the mail to a diferent modarator for each blog.

  10. Needs “captcha” added bad. Any chance you guide me through adding captcha to the plugin?

    Great plugin just the same.

  11. I modified your code with a simple spam avoidance field. Adding in a captcha or something similar to what I did (you can see it at profootballtalk.com) will significantly decrease emails to admins on popular sites.

  12. Nice plugin that i’ve adapted to suit my site, is there any way of incorporating the page with my blog template? It looks a little out of place at the moment.

    (I know i could drop the form into a hacked version of my template but am looking a straightforward solution.)

  13. thanks man, but how to do this for posts??

  14. Hi friend,

    I really appreciate what you have done. It’s great. Can you please code the plugin which do the same thing so that visitor can report a post on my site which is not working.

    I am waiting for ur reply.

    Thanks a lot for your support.

    Regards,
    GP.

  15. 16
    Alex

    Does anyone know if this works with WP 2.5?

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.