oAkismet = new Akismet(BX_DOL_URL_ROOT, $sKey); $oProfile = BxDolProfile::getInstanceByAccount((int)$iAccoutId); $this->oAkismet->setCommentAuthorEmail($oAccount->getEmail()); $this->oAkismet->setCommentAuthor($oProfile->getDisplayName()); $this->oAkismet->setCommentAuthorURL($oProfile->getUrl()); } } public function isSpam ($s, $sPermalink = false) { if (!$this->oAkismet) return false; $this->oAkismet->setCommentContent($s); if ($sPermalink) $this->oAkismet->setPermalink($sPermalink); return $this->oAkismet->isCommentSpam(); } public function onPositiveDetection ($sExtraData = '') { $o = bx_instance('DNSBlacklists', array(), 'bx_antispam'); $o->onPositiveDetection (getVisitorIP(), $sExtraData, 'akismet'); } } /** @} */