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: « 9 8 7 6 5 4 [3] 2 1 » Show All

  1. I am unable to receive email–but no errors are returned. My server is Win 2008, my email address is same domain. I have WP-Mail-SMTP plugin because my server apparently does not support mail(). Is this why your plugin doesn’t work for me? Is there any way to reconfigure? Or is there another problem/solution?

    Thanks,
    Matthew

  2. I have a simple request for this great plugin. Can you make it so that users have to be logged in to report a comment? This is to help prevent spam and instead of getting the ip i would get the username…please email me at my site email provided asap. Thanks for your time.

  3. 43
    Kruben Chung

    Great plugin and I like it, installed it it on my WP 2.8.4, looked great and worked wonders, but had to deactivate it because it places ALL comments onto moderation and now I have to baby-seat my site. I get tons of comments and putting everything under moderation is no option at all. Same problem as Ben in comment #41

    Does any know how to disable this feature? Great plugin otherwise.

  4. 42
    neologan

    i second the use of thickbox, if you can get it working :)

    would also like to know how i can turn off auto placement so i can do it myself, and what the code would be.

    thanks.

  5. We’ve found all of the comments have been placed in the pending folder following adding this plugin. Has anyone else found that? How do we stop it?

  6. very nice sites thanks

  7. This plugin has been tested, and works, with the latest release of WordPress – 2.8

    I will certainly keep your suggestions in mind for future releases.

  8. 38
    Jean-Paul Horn

    Is it possible to remodel the popup into a Thickbox modal dialog (since it’s already loaded with WordPress)? Tried this myself, but couldn’t find the exaxt code :-(

  9. Very exceptional pieces of information. Very nice webpage though. I applaud

  10. 36
    sota

    is there any way to change font of the link (Report comment)
    thank you,

  11. 35
    Craig

    Great plugin, I can’t believe no one else had ever done this before!

    Could you please let me know if it is possible to disable the automatic insertion of the code – as I would like to call the plugin myself after wrapping it nicely in a styled div at the very bottome of each comment. Yes, I use a custom comments loop :-D

    Thanks!

  12. 34
    Roar

    Oh my god, thank you so much. With some posts getting 400 comments, it will be good if people can report fights.

  13. What a great plugin and exaccly what i’ve been looking for. One question though. Any idea how i’d put a wrapper around it so a comment can only be reported once? I have 50,000 odd readers & it would be worse than spambots if they all took objection to a comment at the same time.

  14. Mike R: I just added instructions on how to do so at the bottom of the page. Enjoy!

  15. 31
    Mike R

    Hey guys,

    I have been using this for a couple of months now and it does what it says on the tin. What I could *really* do with is having the IP address of the person reporting the comment included in the report.

    Is there an easy way I could add a line to the code to get it to do this? I’m no coder but can edit if someone can give me the code and the place :)

Pages: « 9 8 7 6 5 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.