From 237d08d5dd2b3a5f37bce3a0ae43b3513473ff18 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 13 Dec 2010 00:50:08 +0000 Subject: [PATCH] FEATURE: added extension for new comments module --- _config.php | 17 ++++++++++++++++- code/extensions/CommentSpamProtection.php | 23 +++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 code/extensions/CommentSpamProtection.php diff --git a/_config.php b/_config.php index 15c5adc..c772bab 100644 --- a/_config.php +++ b/_config.php @@ -1,3 +1,18 @@ \ No newline at end of file +/** + * Default configuration settings for the Spam Protection module. + * + * You should not put your own configuration in here rather use your + * mysite/_config.php file + * + * @package spamprotection + */ + +if(class_exists('Comment')) { + /** + * If the comments module is installed then add the spam protection module + * to the comments form via this extension + */ + Object::add_extension('CommentingController', 'CommentSpamProtection'); +} \ No newline at end of file diff --git a/code/extensions/CommentSpamProtection.php b/code/extensions/CommentSpamProtection.php new file mode 100644 index 0000000..a2225ce --- /dev/null +++ b/code/extensions/CommentSpamProtection.php @@ -0,0 +1,23 @@ + 'author_name', + 'CommenterURL' => 'author_url', + 'Comment' => 'post_body', + 'Email' => 'author_email' + )); + } +} \ No newline at end of file