Akismet can be used together with Captcha module, so when a people post a comment, after their captcha entered code is valid, then the code will also check for the inputted comment text by sending request to Akismet to check the comment is a spam or not.
Akismet then return whether is True or False.
If result is True then this is spam posted comment, the code will display error page. if result is False then the comment can be inserted to db.
To install this to your VP-ASP is pretty simple.
Follow these steps below:
1. Download the akismet.class.zip from this link below:
http://helpnotes.vpasp.com/files/akismet.class.zip
2. Unzip the file and upload the file akismet.class.asp to the root of your installed VP-ASP site.
3. Open file shopnewsreviewadd.asp using notepad or text editor.
4. Locate this code below (around line 6) :
<!--#include file="shopmailformattemplate.asp"-->
<!--#include file="akismet.class.asp"-->
if lcase(blnCAPTCHAcodeCorrect2) = "correct" then
'Fine
'Check spam with akismet. Spammer will work hard to get pass CAPTCHA AND AKISMET.
'Request akistmet to test a comment
dim SpamSentinelAkismet : set SpamSentinelAkismet = new Akismet
SpamSentinelAkismet.initialize "ENTER YOUR AKISMET API KEY", "ENTER YOUR VPASP SITE URL"
SpamSentinelAkismet.setPermalink "ENTER YOUR VPASP NEWS URL"
SpamSentinelAkismet.setCommentType "comment"
SpamSentinelAkismet.setCommentAuthor "Author"
SpamSentinelAkismet.setCommentAuthorEmail "ENTER YOUR EMAIL"
SpamSentinelAkismet.setCommentAuthorUrl "ENTER YOUR SITE URL"
SpamSentinelAkismet.setCommentContent RatingComment
'Response.write SpamSentinel.isSpam()
if SpamSentinelAkismet.isSpam() = True then
'spam comment detected, return to error page.
SError = SError & " Your comment is detected as spam.<br />"
else
'fine - comment can go through db.
end if
set SpamSentinelAkismet = nothing
Note : Please change the above values like :
ENTER YOUR AKISMET API KEY : eg. adbd851b9425
ENTER YOUR VPASP SITE URL : eg. http://www.myvpaspsite.com/
ENTER YOUR VPASP NEWS URL : e.g. http://www.myvpaspsite.com/shopnews.asp
ENTER YOUR EMAIL : eg. [email protected]
ENTER YOUR SITE URL : eg. http://www.myvpaspsite.com/
to refer to your own details.
8. Locate this code below (around line 169-170) :
if blnCAPTCHAcodeCorrect then
'Fine
'Check spam with akismet. Spammer will work hard to get pass CAPTCHA AND AKISMET.
'Request akistmet to test a comment
dim SpamSentinelAkismet2 : set SpamSentinelAkismet2 = new Akismet
SpamSentinelAkismet2.initialize "ENTER YOUR AKISMET API KEY", "ENTER YOUR VPASP SITE URL"
SpamSentinelAkismet2.setPermalink "ENTER YOUR VPASP NEWS URL"
SpamSentinelAkismet2.setCommentType "comment"
SpamSentinelAkismet2.setCommentAuthor "Author"
SpamSentinelAkismet2.setCommentAuthorEmail "ENTER YOUR EMAIL"
SpamSentinelAkismet2.setCommentAuthorUrl "ENTER YOUR SITE URL"
SpamSentinelAkismet2.setCommentContent RatingComment
'Response.write SpamSentinel2.isSpam()
if SpamSentinelAkismet2.isSpam() = True then
'spam comment detected, return to error page.
SError = SError & " Your comment is detected as spam.<br />"
else
'fine - comment can go through db.
end if
set SpamSentinelAkismet2 = nothing
Note : Please change the above values like :
ENTER YOUR AKISMET API KEY : eg. adbd851b9425
ENTER YOUR VPASP SITE URL : eg. http://www.myvpaspsite.com/
ENTER YOUR VPASP NEWS URL : e.g. http://www.myvpaspsite.com/shopnews.asp
ENTER YOUR EMAIL : eg. [email protected]
ENTER YOUR SITE URL : eg. http://www.myvpaspsite.com/
to refer to your own details.
10. Save the file and upload to your site.
11. You are done.
To test as a spam post, you can enter the text below into the comment box of your news :
<a href="http://www.remedyshop.net/">Tramadol</a> socc <a href="http://www.painpillsmarket.com/">Tramadol</a> imy
The news review form should return msg that your comment is detected as spam.
Read also the helpnotes below to protect your blog and product comment from spam :
http://helpnotes.vpasp.com/kb/46-Security-&-Patches/1020-More-protection-to-your-blog-review-comment-from-spam/
http://helpnotes.vpasp.com/kb/46-Security-&-Patches/1080-More-protection-to-your-product-review-comment-from-spam/