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