MINOR: how to add spam control

This commit is contained in:
Sunny Side Up 2023-08-10 16:11:43 +12:00 committed by GitHub
parent 7e202debb7
commit a650b95a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -75,6 +75,20 @@ use SilverStripe\CMS\Model\SiteTree;
// Get the setting
$loginRequired = singleton(SiteTree::class)->getCommentsOption('require_login');
```
### spam control
you can create a comment.yml file with the following content:
```yml
---
Name: 'app_comments_spam'
---
SilverStripe\Comments\Forms\CommentForm:
extensions:
- SilverStripe\SpamProtection\Extension\CommentSpamProtection
```
## HTML Comments