Jump to content

扩展:外部链接确认

From mediawiki.org
This page is a translated version of the page Extension:ExternalLinkConfirm and the translation is 36% complete.
MediaWiki扩展手册
ExternalLinkConfirm
发行状态: 不再維護
描述 Requires the user to confirm that they want to be sent to the external site, after clicking an external link.
作者 Pastakhov
最新版本 1.0
兼容性政策 对于每个有长期支持的MediaWiki发行版本,扩展内都有对应的分支。
MediaWiki 1.35+
许可协议 GNU通用公眾授權條款2.0或更新版本
下載

  • $wgExternalLinkConfirmWhitelist
  • $wgExternalLinkConfirmTarget
季度下載量 0
前往translatewiki.net翻譯ExternalLinkConfirm扩展
問題 开启的任务 · 报告错误

The ExternalLinkConfirm extension requires users to confirm after clicking an external link, before being sent to the external site.

This extension was created for WikiWorks.

安裝

  • 下载文件,并将解压后的ExternalLinkConfirm文件夹移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExternalLinkConfirm
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'ExternalLinkConfirm' );
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

配置

This extension has 2 configuration parameters which can be modified in LocalSettings.php .

$wgExternalLinkConfirmWhitelist
List of the sites that do not require confirmation before visiting.
Per default, no domains are whitelisted.
The domains in the whitelist can include wildcard characters (*) in place of any of the domain levels, e.g. '*.flickr.com' or 'upload.*.gov.uk'.
例如:
$wgExternalLinkConfirmWhitelist = [ '*.flickr.com', 'upload.*.gov.uk' ];
$wgExternalLinkConfirmTarget
For determining what the target will be for the external site.
Works similarly to $wgExternalLinkTarget.
默认值: _self