Extension:ExternalLinkConfirm

From mediawiki.org
MediaWiki extensions manual
ExternalLinkConfirm
Release status: unmaintained
Description Requires the user to confirm that they want to be sent to the external site, after clicking an external link.
Author(s) Pastakhov
Latest version 1.0
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki 1.35+
License GNU General Public License 2.0 or later
Download

  • $wgExternalLinkConfirmWhitelist
  • $wgExternalLinkConfirmTarget
Quarterly downloads 3 (Ranked 139th)
Translate the ExternalLinkConfirm extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

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.

Installation[edit]

  • Download and move the extracted ExternalLinkConfirm folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExternalLinkConfirm
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'ExternalLinkConfirm' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

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'.
Example:
$wgExternalLinkConfirmWhitelist = [ '*.flickr.com', 'upload.*.gov.uk' ];
$wgExternalLinkConfirmTarget
For determining what the target will be for the external site.
Works similarly to $wgExternalLinkTarget.
Default: _self