diff --git a/options.php b/options.php index 3b99b61..c63959d 100644 --- a/options.php +++ b/options.php @@ -845,7 +845,52 @@ function optionsframework_options() 'id' => 'norobot', '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头像链接*/