Add a CAPTCHA options

This commit is contained in:
smallxu038 2024-02-19 23:46:53 +08:00 committed by GitHub
parent 910e9af05e
commit 0397267928
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -846,6 +846,51 @@ function optionsframework_options()
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('机器人验证方式', 'sakura'), /* 验证类型 */
'desc' => __('reCAPTCHA已更换为reCAPTCHA.net国内正常使用。', 'sakura'), /* 选择验证码类型 */
'id' => 'verification_type',
'std' => '0',
'type' => 'radio',
'options' => array(
'CF Turnstile' => __('Cloudflare Turnstile 网络波动可能导致验证失败,需要设置站点密钥与后端秘钥。', 'sakura'),
'Google reCAPTCHA' => __('Google reCAPTCHA需要设置站点密钥与后端秘钥。', 'sakura'),
'Google reCAPTCHA v3' => __('Google reCAPTCHA v3需要设置站点密钥与后端秘钥。', 'sakura'),
//'geetest' => __('geetest需要设置密钥', 'sakura'), 废弃原因:主题样式不兼容
'mCAPTCHA' => __('mCAPTCHA需要自己使用Docker搭建并配置站点密钥与后端密钥', 'sakura'),
'Theme CAPTCHA' => __('主题内建简单验证', 'sakura'),));
$options[] = array(
'name' => '站点密钥',
'desc' => '设置前端的站点密钥/Site-key如果使用mCAPTCHA则填写完整小部件链接',
'id' => 'site_key',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => '后端密钥',
'desc' => '设置与验证服务器请求的密钥/Secret-key',
'id' => 'secret_key',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => 'mCAPTCHA服务器地址',
'desc' => '没有选择可以不填',
'id' => 'mcaptcha_server',
'std' => 'https://demo.mcaptcha.org/api/v1/pow/siteverify',
'type' => 'text');
$options[] = array(
'name' => __('reCAPTCHA 隐形模式', 'sakura'), /*机器人验证*/
'desc' => __('选择开启隐形模式需要在reCAPTCHA控制台设置类型v2 隐形 Enterprise', 'sakura'), /*开启机器人验证*/
'id' => 'rehidden',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => '验证分数',
'desc' => 'reCAPTCHAv3的验证分数从0.0-1.0,越高越接近人类。',
'id' => 'rescore',
'std' => '0.5',
'type' => 'text');
$options[] = array(
'name' => __('QQ avatar link encryption', 'sakura'), /*QQ头像链接加密*/
'desc' => __('Do not display the user\'s qq avatar links directly.', 'sakura'), /*不直接暴露用户qq头像链接*/