扩展:RottenLinks
![]() 發佈狀態: 穩定版本 |
|
---|---|
![]() |
|
描述 | Provides the Special page Special:RottenLinks. |
维护者 | Miraheze system administrators |
最新版本 | continuous updates |
MediaWiki | 1.35.3+ |
PHP | 7.2+ |
数据库更改 | 是 |
Composer | miraheze/rotten-links |
许可协议 | GNU通用公眾授權條款3.0或更新版本 |
下載 | README CHANGELOG |
|
|
The RottenLinks extension provides the special page "Special:RottenLinks", which shows a table of all external links on your wiki pages, and tells you their status.
For reporting an issue or a bug, please use Miraheze Phabricator. See here for the workboard.
安裝
- 下载文件,并将其放置在您
extensions/
文件夹中的RottenLinks
目录内。 - 将下列代码放置在您的
LocalSettings.php
的底部:wfLoadExtension( 'RottenLinks' );
- 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
- 根据需要配置。
- Run the following script to populate the special page "Special:RottenLinks":
php extensions/RottenLinks/maintenance/updateExternalLinks.php
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
配置
$wgRottenLinksBadCodes
- Holds a list of HTTP codes that are considered bad. 默认为
[ "0", "400", "401", "403", "404", "405", "502", "503", "504" ]
。 $wgRottenLinksCurlTimeout
- Sets the timeout for cURL in seconds. 默认为
30
。 $wgRottenLinksHTTPProxy
- Sets a proxy to use for requests. Defaults to
""
(use no proxy). Example:$wgRottenLinksHTTPProxy = "http://username:password@proxy.example.com:8080";
$wgRottenLinksExcludeProtocols
- Holds a list of protocols that should not be checked for validity. 默认为
[ "tel", "mailto" ]
。 $wgRottenLinksExternalLinkTarget
- Sets the external link target (
_self
for the current tab or_blank
for new tab). 默认为_self
。 $wgRottenLinksExcludeWebsites
- List of websites to blacklist checking of response codes for. Defaults to
false
. Omit the protocol, e.g. use$wgRottenLinksExcludeWebsites = [ "www.example.com" ];
用法
Run the "updateExternalLinks.php" script provided with the extension every time you would like to create or update the list of rotten links shown on special page "Special:RottenLinks".
此擴充功能包含在以下包或/和wiki農場: 這不是一份權威名單。即使一些wiki農場/託管者沒有被列在這裡,他們也可能包含這個extension。請以各wiki農場/託管者或包的狀態為準。 |
This extension is made by Miraheze. It may have issues you don't see in Miraheze. To report a bug or request a configuration change, please do so in the Miraheze Phabricator instead of the Wikimedia one. |