Manual:$wgExtensionCredits

From MediaWiki.org

Jump to: navigation, search
Extensions: $wgExtensionCredits
Global list of extension credits
Introduced in version: 1.5.0
Removed in version: still in use
Allowed Values: See details
Default Value: array()

Other settings: Alphabetical | By Function


[edit] Details

An array of extension types and inside that their names, versions, authors and urls. This credit information get added to the wiki's Special:Version page, allowing users to see which extensions are installed, and find more information about them.

This is not a configuration settings mentioned in LocalSettings.php. Typically extension developers will write code which appends to the array contained in this global variable.

See Manual:Extensions#Registering features with MediaWiki

[edit] Usage

Extension developers can append to the array with the following code:

$wgExtensionCredits[$type][] = array(
        'name' => "",           // Name of extension - string
        'description' => "",    // Description of what the extension does - string
        'descriptionmsg' => "", // Same as above but name of a message, for i18n - string, added in 1.12.0
        'version' => 0,         // Version number of extension - number or string
        'author' => "",         // The extension author's name - string
        'url' => "",            // URL of extension (usually instructions) - string
 );

version and url keys are optional, and can be omitted.

In version 1.12 and newer, descriptionmsg will override description. The value of descriptionmsg will be treated as the name of the message used for the description.

$type must be one of the following:

  • specialpage - extensions that add special pages
  • parserhook - extensions that modifies, adds or replaces functionality in the MediaWiki parser
  • variable (added in 1.6.0)
  • media (added in 1.11) - media handlers
  • other

Description and author fields get parsed as wiki syntax.

[edit] Example

$wgExtensionCredits['specialpage'][] = array(
        'name' => 'Example extension',
        'version' => 1.9,
        'author' => 'Foo Barstein',
        'url' => 'http://www.mediawiki.org/wiki/Extension:MyExtension',
        'description' => 'Performs some action, by way of example.',
        'descriptionmsg' => 'foobar-desc',
);
Personal tools