Extension:ExtraMagic

MediaWiki extensions manual
ExtraMagic
Release status: stable
Implementation Parser extension
Description Adds useful variables and parser functions
Author(s) Aran Dunkley, Igor Absorto, Professional Wiki
Latest version 4.0.0 (2023-06-29)
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki >= 1.39.0
PHP >= 8.0
Database changes No
License GNU General Public License 2.0 or later
Download

The ExtraMagic extension adds various variables and parser functions:

  • {{REQUEST:...}} -> gets a parameter from $_REQUEST
  • {{COOKIE:...}} -> gets a parameter from $_COOKIE
  • {{USERID:...}} -> either returns the current user's ID or the user ID of a user with the given name.
  • {{IFGROUP:...}} -> determines whether the current user is in a given group.
  • {{IFUSES:...}} -> determines if a page uses a specific template.
  • {{IFCAT:...}} -> determines if a page is in a specific category.
  • {{NEXT:...}} -> unclear
  • {{PREV:...}} -> unclear
  • {{OWNER:...}} -> determines who created a given page
  • {{PRIVATE:...}} -> returns a given value from $wgPrivateData if the current user is authorized to access it
  • {{CURRENTUSER}} -> the username of the current user
  • {{CURRENTPERSON}} -> the real name of the current user
  • {{CURRENTLANG}} -> the interface language of the current user
  • {{CURRENTSKIN}} -> the default skin of the current user
  • {{ARTICLEID}} -> the page ID of the current page
  • {{DOMAIN}} -> the domain name of the wiki
  • {{GUID}} -> a GUID based on the current time
  • {{USERPAGESELFEDITS}} -> a list of users who have edited their user page (?)

Installation

edit
  • Download and place the file(s) in a directory called ExtraMagic in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'ExtraMagic' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

See also

edit