I just found an interesting post about enabling akismet support in joomlacomment.
Here you can read the original article.
I tested it myself in my dev. environment and OMG it is working :) Here is the code that will go into joomlacomment4.0 beta1 next week.
at the beggining of comment.class.php
require_once(JPATH_SITE.DS.'components'.DS.'com_comment'.DS.'assets'.DS.'classes'.DS.'akismet'.DS.'Akismet.class.php');
and then later on in the insertNewPost function
// START Marcofolio.net Akismet
$WordPressAPIKey = '$akismetkey'; // Insert WordPress API Key
$MyBlogURL = substr_replace(JURI::base(),'',-1); // Insert your own blog URL (Don't end with '/')
$akismet = new Akismet($MyBlogURL ,$WordPressAPIKey);
$akismet->setCommentAuthor($name);
$akismet->setCommentAuthorEmail($email);
$akismet->setCommentAuthorURL($website);
$akismet->setCommentContent($comment);
// For Joomla! 1.5.x
$akismet->setPermalink($MyBlogURL);
if($akismet->isCommentSpam())
{
// store the comment but mark it as spam (in case of a mis-diagnosis)
$published = 0;
}
The thing I don't understand is this $akismet->setPermalink() function. What does it do? Do we really have to post a direct link to the content item we are commenting or we can leave it empty? From the documentation I've read http://api.silverstripe.org/akismet/Akismet.html it seems that I can leave this empty. Anyone, any ideas?
What I still have to do is make some config variables so that you can provide your your akismetkey and this should also help very much to reduce the spam.
P.S. Special thanks to Marco Kuiperfor providing this tutorial :)