From eba9eb1e501dd892df0c45830f7f7d17a4a4bac8 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 13 Mar 2014 23:18:41 +0100 Subject: [PATCH] Improve docs for $wgExtensionCredits (and add 'license-name') Follows-up 357eb3d488b9d8c which implemented 'license-name'. Change-Id: I2b2c17965230558fd1650e3db92abafb082737d1 --- includes/DefaultSettings.php | 44 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c35070a7dd..71851d557c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6081,30 +6081,44 @@ $wgAutoloadClasses = array(); $wgAutoloadAttemptLowercase = true; /** - * An array of extension types and inside that their names, versions, authors, - * urls, descriptions and pointers to localized description msgs. Note that - * the version, url, description and descriptionmsg key can be omitted. + * An array of information about installed extensions keyed by their type. + * + * All but 'name', 'path' and 'author' can be omitted. * * @code * $wgExtensionCredits[$type][] = array( - * 'name' => 'Example extension', - * 'version' => 1.9, * 'path' => __FILE__, - * 'author' => 'Foo Barstein', - * 'url' => 'http://www.example.com/Example%20Extension/', - * 'description' => 'An example extension', + * 'name' => 'Example extension', + * 'author' => array( + * 'Foo Barstein', + * ), + * 'version' => '1.9.0', + * 'url' => 'http://example.org/example-extension/', * 'descriptionmsg' => 'exampleextension-desc', + * 'license-name' => 'GPL-2.0', * ); * @endcode * - * Where $type is 'specialpage', 'parserhook', 'variable', 'media' or 'other'. - * Where 'descriptionmsg' can be an array with message key and parameters: - * 'descriptionmsg' => array( 'exampleextension-desc', param1, param2, ... ), + * The extensions are listed on Special:Version. This page also looks for a file + * named COPYING or LICENSE (optional .txt extension) and provides a link to + * view said file. When the 'license-name' key is specified, this file is + * interpreted as wikitext. + * + * - $type: One of 'specialpage', 'parserhook', 'variable', 'media' or 'other'. + * + * - author: A string or an array of strings. Authors can be linked using + * the regular wikitext link syntax. To have an internationalized version of + * "and others" show, add an element "...". This element can also be linked, + * for instance "[http://example ...]". + * + * - descriptionmsg: A message key or an an array with message key and parameters: + * `'descriptionmsg' => array( 'exampleextension-desc', param1, param2, ... ),` + * + * - description: Description of extension as inline string instead of + * localizable message (omit in favour of 'descriptionmsg'). * - * author can be a string or an array of strings. Authors can be linked using - * the regular wikitext link syntax. To have an internationalized version of - * "and others" show, add an element "...". This element can also be linked, - * for instance "[http://example ...]". + * - license-name: Short name of the license (used as label for the link), such + * as "GPL-2.0" or "MIT" (https://spdx.org/licenses/ for a list of identifiers). */ $wgExtensionCredits = array(); -- 2.20.1