將 reCAPTCHA 與 MediaWiki 搭配使用
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
重要事項:系統已不再支援 reCAPTCHA API 1.0 版,請升級至 2.0 版。瞭解詳情
reCAPTCHA MediaWiki 外掛程式採用 CAPTCHA 來防範垃圾郵件。
以下說明如何將 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,則必須註冊
金鑰列於這裡)。
大功告成!您現在應該已經有人機驗證 (Captcha) 了!
-
系統何時會顯示人機驗證 (Captcha)?該如何調整?
-
根據預設,人機驗證 (Captcha) 會在下列事件發生時觸發:
- 新使用者註冊
- 匿名編輯含有新的外部連結
- 蠻橫的密碼破解
這些設定可在 LocalSettings.php 中調整。如需可能選項,請參閱確認 Edit.php
-
如何解除安裝 reCAPTCHA?
-
只需移除新增至 LocalSettings.php 的行即可。你也可以
刪除您在擴充功能目錄中建立的資料夾。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間: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"]],["上次更新時間: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"]]