Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+11 votes
2k views
in Plugins by

Overview
I'm developing an antispam event handler that checks questions, answers and comments for spam by submitting them to Akismet's API. Akismet was created by the same people who make Wordpress and it keeps their comments pretty clean.

Logic
When a comment is posted or edited, an event will trigger and send the information to Akismet. If it comes back as clean, nothing is done. If it comes back as spam, the message will be flagged as spam and marked hidden.

Each comment will have a spam button to give admins the ability to mark anything that wasn't flagged by Akismet as spam.

There'll be a page listing all messages that've been marked as spam so you can review them and unmark a message as spam if needed.

Database
I'm trying to figure out a good way to mark a message as spam without adding a field or table. The only way I can come up with is to increase the flag count by a set number. For example, when something is marked as spam by Akismet, I can incrase the flag count by 20. Then, in the page that shows the spam, I show all messages that have a flag count of over 20.

Otherwise, I can just add a table and add the postid of spam messages.

Other thoughts
I'm not sure how well this will work regarding anonymous users.
I'll need someone to test this with an external user plug-in since I'm personally using the integrated accounts.
Are there any considerations I should take into account with 1.5?
Any other features and suggestions?

Q2A version: 1.4.3
by
edited by
This sounds really useful!

A honeypot might be a useful feature.

I was looking at doing something similar, but I'm not a coder and haven't had any time to go any further. Not sure if this is useful but you might be able to make use of some pre-existing Api's at  http://akismet.com/development/

Also found a plugin that uses botscout
https://github.com/sawtoothsoftware/Q2A-Spammer-Checker
by
I would wait for 1.5... looks like there will be a moderation queue built-in, so all you will have to do is add the akismet php class and check on posts.
by
I already got the API and have been playing with it. It's pretty simple and most of the code is going to be in building the page that unspams things.

I might wait for 1.5 but then again it's a relatively simple plug-in so updating it later shouldn't be too much trouble and it'll be available to those who won't upgrade for awhile.
by
This is great! Is it also possible to perform a check on new user registrations? I get a lot of fake registrations on my site even though I use recaptcha.
Something like when a user is a confirmed spambot, automatically block it, so the admin can delete it manually (in 1.5).
by
Spammer Checker did a good job, but it presently doesn't seem to be compatible to version 1.5 beta 2.
by
I'm working to release my site on 1.4 right now but will shift to 1.5 soon and make sure my plug-in works with 1.5.
by
How might this be different from and superior to the Spammer Checker plug-in that already exists?
by
Akismet checks the content of the message along with the IP. I believe the existing ones only check the IP.
by
Check this,

https://github.com/CleanTalk/php-uni

strong anti-spam in senconds

1 Answer

+6 votes
by
In Q2A 1.5 a plugin will be able to pre-check a post before it is created, indicate to Q2A that it should be queued for approval, and/or show an error. So probably worth hanging in there for a short time!
by
Its the main feature i am waiting for. Its really a necessary feature and hope to see V1.5 faster.
by
Now that 1.5 is out, has there been any further work on Akismet plug-in?
...