Manual:$wgExternalLinkTarget/ru

Category:MediaWiki configuration settings/ru#ExternalLinkTargetCategory:MediaWiki configuration settings introduced in version 1.14.0/ru#ExternalLinkTargetCategory:MediaWiki configuration settings still in use/ru#ExternalLinkTargetCategory:Parser variables/ru#ExternalLinkTarget
Parser: $wgExternalLinkTarget
Устанавливает цель по умолчанию для внешних ссылок.
Введено в версии:1.14.0 (r41333)
Удалено в версии:всё ещё используется
Допустимые значения:(строка) или false
Значение по умолчанию:false

Детали

Устанавливает цель по умолчанию для внешних ссылок. If set to e.g. "_blank", this will also set the "noreferrer" and "noopener" link rel to prevent the attack described at https://mathiasbynens.github.io/rel-noopener/. Some older browsers may not support these link attributes, hence setting $wgExternalLinkTarget to _blank may represent a security risk to some of your users.

Add the following entry to LocalSettings.php file in order to open external links in a new window / tab.

$wgExternalLinkTarget = '_blank';

If the value is set to false, then no target attribute is used with external links (This behavior is the same as _self).

When changing the value, page cache must be refreshed in order to make the setting effective.

См. также

Category:MediaWiki configuration settings/ru Category:MediaWiki configuration settings introduced in version 1.14.0/ru Category:MediaWiki configuration settings still in use/ru Category:Parser variables/ru