gelysis / gs4-uniprotect
为 Silverstripe 4 提供的简单反垃圾邮件模块。
0.9.7-beta
2018-03-01 23:21 UTC
Requires
- silverstripe/spamprotection: ~3.0|~3.0@dev
This package is auto-updated.
Last update: 2024-09-29 05:08:15 UTC
README
SilverStripe 4 Uniprotect 表单字段模块
版权 ©2018, Andreas Gerhards andreas@gelysis.net. 版权所有。 / Alle Rechte vorbehalten. / Tous droits réservés.
许可协议
Gs4Uniprotect 模块是开源的,并按照BSD-3-Clause许可。
请参阅 LICENSE.md 获取更多详细信息。
LIZENZ
Das Gs4Uniprotect-Modul ist Open Source und unter der BSD-3-Klausel lizensiert.
Bitte lesen sie LICENSE.md für weitergehende Informationen.
系统需求
需要 PHP 5.6(推荐 7.1)或更高版本。
描述
此包是 SilverStripe 4 的可选模块。它提供了一个隐藏的 FormField,允许表单通过检查该字段的值是否正确来验证非机器人提交。
安装
- 使用 packagist 依赖项:
gelysis/gs4-uniprotect。
用法
独立字段
如果您想单独使用 UniProtect 字段,只需将其作为表单中的一个字段包含即可。
$uniprotectField = new Gs4Uniprotect\UniProtectField('MyUniProtect');
与反垃圾邮件的集成
您可以使用它来保护您网站上的任何自定义表单,包括在 Blog 模块中的用户评论。例如,在 mysite/_config/config.yml 中:
FormSpamProtectionExtension:
default_spam_protector: 'UniProtectProtector'
设置此配置后,您需要按照 SpamProtection 模块页面上的说明包含垃圾邮件保护字段。
问题和反馈
请联系作者。
发布信息
Gs4Uniprotect 0.9.7 2018-03-02
更新
请参阅 CHANGELOG.md。