Extension:GetUserName/pl
![]() Status wydania: stabilne |
|
---|---|
Realizacja | Zmienna |
Opis | Allows the current user's name to be put in a page |
Autor(zy) | Antoine Mercier-Linteau, Ejcaputo |
Ostatnia wersja | 2.1 (2022-01-02) |
Polityka zgodności | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.35+ |
Licencja | GNU General Public License 2.0 |
Pobieranie | GitHub: Uwaga: README |
The GetUserName extension allows to obtain the current user's name from wgUser
and insert it on a page.
Usage
When {{#USERNAME:}}
is found in the page, it will replace it with the current user name.
The cache is invalidated for pages using this extension.
In the visual editor,
{{#USERNAME}}
will evaluate to your current IP address because session information is not preserved when Parsoid parses pages. This also mean template substitution does not work with this tag.Installation
- Download i umieść plik(i) w katalogu o nazwie
GetUserName
w swoim kataloguextensions/
. - Dodaj poniższy kod na dole twojego pliku
LocalSettings.php
:wfLoadExtension( 'GetUserName' );
Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.
Do użytkowników używających wersji MediaWiki 1.24 lub wcześniejszej:
Powyższe instrukcje opisują nowy sposób instalowania tego rozszerzenia z wykorzystaniem wfLoadExtension()
.
Jeżeli chcesz zainstalować to rozszerzenie we wcześniejszych wersjach (MediaWiki 1.24 i wcześniejsze), zamiast wfLoadExtension( 'GetUserName' );
użyj:
require_once "$IP/extensions/GetUserName/GetUserName.php";