Hey,
I was having this problem too and getting a large number of spam comments a day. I looked into akismet and it looks good ("runs hundreds of tests on the comment" -
http://akismet.com). There is also a joomla component which acts as a framework for the requests which you can get here:
http://www.waltercedric.com/downloads/cat_view/333-joomla15/344-akismet4joomla--akismet4joomla-.html.
I found a bug in this extension but fixed it quite easily and you can see my fix on that extension's forum here:
http://forums.waltercedric.com/index.php/topic,713.0.htmlNow the code to put in your components/com_chronocomments/chronocomments.php file:
//Tom- put in code to check against askimet if verify has returned 1
if ($post['verify']==1)
{
require_once(JPATH_BASE.DS. "administrator/components/com_akismet/akismetJoomlaAPI.php");
$JoomlaAkismetAPI = & new JoomlaAkismetAPI();
$oracleDecision = $JoomlaAkismetAPI->isCommentSpam("", $post['name'], $post['email'], $post['url'], $post['text']);
$post['verify'] = ($oracleDecision) ? 0 : 1;
}
//---- end changes
in version 1.0 of cc i put this code on line 152 right after the this line:
$post['verify'] = ((($configs->get('new_posts_verified') == '0')|| (($configs->get('new_posts_verified') == '1')&&($user->id))) ? 1 : ((($configs->get('new_posts_verified') == '1')&&($user->guest)) ? 0 : 0));
..and its working a treat for me, spam has completely stopped - well its not actually stopped because the messages still get stored but the verification is set to 0 so they dont show on your site but you can still double check the spam messages in the comments manager. Also you will still get email notifications, although Im sure you can do something about that if you wanted to.
Thanks to Max and Bob (as ever) for this component, walter cedric for the akismet joomla port and the good people at akismet who made it all possible!
Tom
EDIT::
Just realised this method sends out verification emails to the spambot's email address which are now collecting in my mailbox as delivery failures. To stop this change line 178-180 with the following:
// send verification email
if(!$post['commentid']){
if(!$post['verify'] && !isset($oracleDecision) || !$oracleDecision){
so if we have a decision from akismet we dont send an email to the poster.