Jump to content

Module: Comment Filter Antispam Guard


Recommended Posts

Hi Guys,

since i start with Processwire last year, i miss a module for filter Spam at the comment field without any external service. I know about a good module from the time i use Wordpress. Now i have move the most part of the module to work on Processwire.

I have write about the Module idea previously: https://processwire.com/talk/topic/10028-comment-spamprotection-without-akismat/#entry116684

And now there is a first alpha on Github: https://github.com/kreativmonkey/antispam-guard

Actually functions:

  • Check bbcode
  • Check regexe
  • Check if the commenter is knowen as approved or spam
  • Check the IP is no fake
  • Automatically approve ore pending no spam comments
  • Automatically approve trusted commenter
  • Automatically mark spam
  • Check Gravatar
  • Check external Spamdb


  • Local spam IP database
  • Add Honeypot to Commentform
  • Only permit certain languages


For testing the module you need some Modification to the FieldtypeComments.module :

if($field->useAkismet) {
     $akismet = $this->modules->get('CommentFilterAkismet');
     $akismet->checkSpam(); // automatically sets status if spam
  } else {
     $comment->status = Comment::statusPending;

if($field->useAntispamguard) {
      $antispam = $this->modules->get('CommentFilterAntispamguard');
      $antispam->checkSpam(); // automatically sets status if spam
   } else {
      $comment->status = Comment::statusPending;

Now you place the CommentFilterAntispamguard.module and CommentFilterAntispamguardConfig.php in the same Folder as FieldtypeComments.module and activate it in the Processwire Module admin section.

At the last step go to you comment field -> options and activate "Use Antispamguard".

I am pleased with your feedback and suggestions for improvement
  • Like 6
Link to comment
Share on other sites

The second change could easily be made by a hook to FieldtypeComments::getConfigInputfields, where $event->return is the form you can edit. $f->insertAfter() will make this really easy to add in.

Thank you for the hint. I updated the Module and use the hook. Is it possible that the Plugin now must be "Autoload"?

Link to comment
Share on other sites

  • 3 years later...


I launched a site with comments functions. Now the website is online and I totally forgot about the missing honeypot option in the comment form.
Are there, besides the Akismet option, other possibilities for spam fighting? The module here is 3 years old and there is a warning: Do not use yet!!!

Is this still the only solution?


Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...