* SSAkismet::setAPIKey(''); * * * You can then view spam for a page by appending ?showspam=1 to the url, or use the {@link CommentAdmin} in the CMS. * * @see http://demo.silverstripe.com/blog Demo of SSAkismet in action * * @package cms * @subpackage comments */ class SSAkismet extends Akismet { private static $apiKey; private static $saveSpam = true; static function setAPIKey($key) { self::$apiKey = $key; } static function isEnabled() { return (self::$apiKey != null) ? true : false; } static function setSaveSpam($save = true) { SSAkismet::$saveSpam = $save; } static function getSaveSpam() { return SSAkismet::$saveSpam; } public function __construct() { parent::__construct(Director::absoluteBaseURL(), self::$apiKey); } } ?>