Podręcznik:$wgExternalLinkTarget

From mediawiki.org
This page is a translated version of the page Manual:$wgExternalLinkTarget and the translation is 55% complete.
Outdated translations are marked like this.
Parser: $wgExternalLinkTarget
Ustawia domyślną wartość atrybutu target dla linków zewnętrznych.
Wprowadzono w wersji:1.14.0 (r41333)
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(string) or false
Domyślna wartość:false

Szczegóły

Ustawia domyślną wartość atrybutu target dla linków zewnętrznych. 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.

Dodaj poniższy plik do pliku LocalSettings.php , aby linki zewnętrzne otwierały się w nowym oknie / karcie.

$wgExternalLinkTarget = '_blank';

Jeżeli wartość jest ustawiona na false, wtedy żaden atrybut target nie jest używany dla linków zewnętrznych. (Skutek jest taki sam, jak przy zastosowaniu wartości _self).

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

Zobacz też