将 reCAPTCHA 与 phpBB2 搭配使用
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
重要提示:1.0 版 reCAPTCHA API 不再受支持,请升级到 2.0 版。了解详情
reCAPTCHA phpBB2 插件使用人机识别系统来防范论坛垃圾内容。
我们建议您使用 reCAPTCHA phpBB MOD 安装 reCAPTCHA。有两个 mod,一个用于注册,一个用于访客帖子。
除了 phpBB MOD 之外,我们还提供了一个补丁,用于在注册时启用 reCAPTCHA。要使用
请按照以下说明操作:
- 下载 zip 文件并解压缩。
- 将文件 recaptchalib.php 移至 phpBB include 目录。
- 从 phpBB include 目录中运行以下命令,以应用第一个补丁:
patch -b usercp_register.php < /path/to/usercp_register.patch
- 将 profile_add_body.tpl.patch 文件移至 phpBB templates/<您的主题>目录(默认情况下
<你的主题>是“subSilver”)
- 从 phpBB templates/<your_theme> 中运行以下命令,以应用第二个补丁目录:
patch -b profile_add_body.tpl < /path/to/profile_add_body.tpl.patch
- 如需注册 reCAPTCHA 密钥,请点击此处。reCAPTCHA 将向您发放
私钥。在 include 目录中打开 usercp_register.php
并使用您收到的值更新 $recaptcha_public_key 和 $recaptcha_private_key。
- 大功告成!现在,您的 reCAPTCHA widget 应该会显示在用户注册页面上。
常见问题解答
-
如果补丁命令失败,该怎么办?
-
补丁是使用统一的 diff (diff -u) 创建的。此文件的不同版本或其他修改可能会导致
冲突。您可以研究补丁文件
以及这如何导致文件发生冲突。
-
我想回滚补丁更改或卸载 reCAPTCHA,该怎么做?
-
当您使用“-b”运行 patch 命令时选项,表示在同一目录中备份了文件。使用 mv
命令用原始文件覆盖修补后的文件。你还可以删除
从 include 目录中删除 recaptchalib.php 文件。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-21。
[[["易于理解","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-08-21。"],[[["reCAPTCHA is a tool that helps prevent forum spam in phpBB2 by using a CAPTCHA."],["Two phpBB MODs are available to install reCAPTCHA, specifically for registration and guest posts, which are recommended over patch installation."],["Patch installation is also an option, involving downloading files, applying patches to specific phpBB files, obtaining reCAPTCHA keys, and updating the usercp_register.php file with these keys."],["Version 1.0 of the reCAPTCHA API is no longer supported; users should upgrade to Version 2.0 for continued functionality."]]],["reCAPTCHA Version 1.0 is deprecated; upgrade to 2.0. The reCAPTCHA phpBB2 plugin, which uses a CAPTCHA, is recommended via phpBB MODs for registration and guest posts. To install via patch, download and extract the zip file, move `recaptchalib.php`, and apply patches to `usercp_register.php` and `profile_add_body.tpl`. Obtain reCAPTCHA keys, and update the keys in `usercp_register.php`. To uninstall, revert to the backup files and delete `recaptchalib.php`.\n"]]