hubertusanton/silverstripe-simplequestioncaptchafield

SilverStripe 简单问题验证字段

dev-master 2016-02-22 13:03 UTC

This package is auto-updated.

Last update: 2024-09-05 19:45:23 UTC


README

维护者联系方式

需求

  • SilverStripe 3+

文档

GitHub Wiki

安装说明

  1. 将此目录放置在您的 SilverStripe 安装根目录下。
  2. 将目录重命名为 simplequestioncaptchafield
  3. 访问 yoursite.com/dev/build?flush=1

用法

这是一个简单易用的验证字段,包含随机问题,人类应该知道答案以防止在 SilverStripe 中表单被垃圾邮件轰炸。

文档

使用示例

$obvious_questions = array(
                        'what is the answer of 1 + 1?' => '2',
                        'What is the first letter of the alphabet?' => 'a',
                        'What is the color of the sky?' => 'blue');
SimpleQuestionCaptchaField::create('SimpleCaptcha', null, '', $obvious_questions);

或者

SimpleQuestionCaptchaField::create('SimpleCaptcha', null, '');

或者一个我喜欢的简单例子

SimpleQuestionCaptchaField::create('SimpleCaptcha', null, '', array(
	'Type the number <strong>TWO</strong> in numbers.' => '2',
	'Type the number <strong>THREE</strong> in numbers.' => '3',
	)
)

帮助

我在制定默认明显问题以及可能使这些支持多语言方面需要一些帮助。