Jump to content
kreativmonkey

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

Future:

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

Testing

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

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

if($field->useAntispamguard) {
      $antispam = $this->modules->get('CommentFilterAntispamguard');
      $antispam->setComment($comment);
      $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

Share this post


Link to post
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.

  • Like 2

Share this post


Link to post
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"?

Share this post


Link to post
Share on other sites

Yeah. But there are way to let autoloading be determined conditionally, but I haven't used them by now.

Share this post


Link to post
Share on other sites

Hi,

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?

 

Share this post


Link to post
Share on other sites

Thanks for these informations. I'll have a closer look at this next week.

Share this post


Link to post
Share on other sites

EDIT: can't delete post, but I need to check more... there was some error on my end.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...