From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
Deutsch • ‎English • ‎español • ‎हिन्दी • ‎日本語 • ‎polski • ‎русский • ‎sicilianu
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status stable

ImplementationTemplate:Extension#type Variable
DescriptionTemplate:Extension#description Adds new built-in variables
Author(s)Template:Extension#username Aran Dunkley, Pavel Astakhov
Latest versionTemplate:Extension#version 3.4.0 (2017-07-25)
MediaWikiTemplate:Extension#mediawiki 1.23+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
ExampleTemplate:Extension#example test.foxway.org
Hooks usedTemplate:Extension#hook

Translate the MyVariables extension if it is available at translatewiki.net

Check usage and version matrix.

The MyVariables extension adds new built-in variables:

Variable Description Sample
{{CURRENTUSER}} Login of current user "Pastakhov"
{{CURRENTLOGGEDUSER}} Login of current user or empty for anonymous users "Pastakhov" or ""
{{CURRENTUSERREALNAME}} Real name of current user "Pavel Astakhov"
{{LOGO}} Path to wiki logo "/w/skins/common/images/wiki.png"
{{UUID}} Random (v4) UUID "65ba1a51-c723-4b9d-b1f3-13148d628322"
{{USERLANGUAGECODE}} Language that the user specified in the preferences "en", "en-ca", "ru", etc.


  • Download and place the file(s) in a directory called MyVariables in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyVariables/MyVariables.php";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


  • This extension should not be confused with the VariablesExtension:Variables extension, which allows the use of variables in the computer programming sense.

See also[edit]