将 reCAPTCHA 与 MediaWiki 搭配使用
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
重要提示:1.0 版 reCAPTCHA API 不再受支持,请升级到 2.0 版。了解详情
reCAPTCHA MediaWiki 插件使用人机识别系统来防止垃圾邮件。
将 reCAPTCHA 添加到 MediaWiki 的方法如下:
下载 ZIP 文件(请注意,
插件仅适用于 MediaWiki 1.8 或更高版本)。
解压缩 MediaWiki 扩展程序。
cd /path/to/mediawiki/extensions/
# * gets whatever version you downloaded
unzip ~/recaptcha-mediawiki-*.zip
# move the package to a standardized directory.
mv recaptcha-mediawiki-* recaptcha
将以下代码行添加到 MediaWiki 的 LocalSettings.php 中:
require_once( "$IP/extensions/recaptcha/ReCaptcha.php" );
// Sign up for these at https://www.google.com/recaptcha/admin#createsite
$recaptcha_public_key = '';
$recaptcha_private_key = '';
在 LocalSettings.php 中输入公钥和私钥。(如果您尚未注册,那么您必须注册 reCAPTCHA
键。)
大功告成!您现在应该已经有人机识别系统了!
-
何时显示人机识别系统?如何调整?
-
默认情况下,出现以下事件时,会触发人机识别系统验证:
- 新用户注册
- 包含新外部链接的匿名修改
- 暴力破解密码
您可以在 LocalSettings.php 中调整这些设置。请参阅 ConfirmEdit.php 了解可能的选项
-
如何卸载 reCAPTCHA?
-
只需移除添加到 LocalSettings.php 中的行即可。您还可以
删除您在扩展程序目录中创建的文件夹。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-09。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-09-09。"],[[["reCAPTCHA Version 1.0 is no longer supported; users must upgrade to Version 2.0."],["This reCAPTCHA MediaWiki plugin helps prevent spam by requiring users to solve a CAPTCHA."],["To install the plugin, download the zip file, unzip it in the extensions directory, add the required lines to LocalSettings.php with your reCAPTCHA keys, and you're set."],["CAPTCHAs are typically displayed for new user registration, anonymous edits with external links, and brute-force password attempts, but these settings can be adjusted."],["Uninstalling the plugin involves simply removing the added line from LocalSettings.php and deleting the extension folder."]]],["The reCAPTCHA MediaWiki plugin prevents spam using CAPTCHAs. To install, download the plugin, unzip it into the MediaWiki extensions directory, and add a `require_once` line to `LocalSettings.php`. You must also sign up for reCAPTCHA keys and input them in `LocalSettings.php`. CAPTCHAs are shown during new user registration, anonymous edits with external links, and brute-force password attempts. Uninstall by removing the added line from `LocalSettings.php` and deleting the plugin folder. ReCaptcha API Version 1 is no longer supported.\n"]]