Template:Extension/Sample: Difference between revisions
Appearance
Content deleted Content added
Added imagesize, tags, and compatibility to correspond with Template:Extension |
Default {{ExtensionInstall}} to use registration, because its 2024 |
||
(36 intermediate revisions by 19 users not shown) | |||
Line 1: | Line 1: | ||
<!-- |
<!-- |
||
************************************************************** |
************************************************************** |
||
Usage instructions: |
Usage instructions: |
||
⚫ | |||
1. REMOVE THE TAG line above this box |
|||
2. Remove any HTML comments from the infobox after you are finished. |
|||
IT WILL PREVENT PROPER DISPLAY OF THE INFOBOX. |
|||
⚫ | |||
3. Remove this comment when you no longer need it. |
3. Remove this comment when you no longer need it. |
||
************************************************************** |
************************************************************** |
||
--> |
|||
<languages/> |
|||
{{Extension|templatemode= |
{{Extension|templatemode = <noinclude>nocats</noinclude> |
||
|name = <includeonly>{{subst:SUBPAGENAME}}</includeonly><noinclude>MyExtension</noinclude> |
|||
⚫ | |||
|status = beta |
|status = beta |
||
|type1 = <!-- implementation type, see [[Template:Extension]] for details |
|type1 = <!-- implementation type, see [[Template:Extension]] for details --> |
||
|type2 = |
|type2 = |
||
|hook1 = <!-- default/custom hooks used, see [[Template:Extension]] for details --> |
|hook1 = <!-- default / custom hooks used, see [[Template:Extension]] for details --> |
||
|hook2 = |
|hook2 = |
||
⚫ | |||
|username = <!-- optional, but strongly recommended --> |
|||
| |
|newhook2 = |
||
| |
|username = <!-- optional, but strongly recommended --> |
||
|author = <!-- add only if different from user name --> |
|||
|image = |
|||
|description = <!-- brief description of purpose / use case --> |
|||
|version = |
|||
| |
|image = |
||
| |
|imagesize = |
||
| |
|version = |
||
| |
|update = |
||
| |
|version preview = |
||
| |
|update preview = |
||
⚫ | |||
⚫ | |||
| |
|mediawiki = <!-- only needed if different from what's in extension.json --> |
||
| |
|php = |
||
| |
|needs-updatephp = |
||
⚫ | |||
}} |
|||
⚫ | |||
{{Extension|templatemode= |
|||
| |
|table2 = |
||
⚫ | |||
|status = beta |
|||
|download = <includeonly>{{WikimediaDownload|{{subst:SUBPAGENAME}}}}</includeonly> |
|||
⚫ | |||
|readme = <includeonly>{{git file|project=mediawiki/extensions/{{subst:SUBPAGENAME}}|file=README|branch=HEAD|text=README}}</includeonly> |
|||
|type2 = |
|||
⚫ | |||
|hook1 = <!-- default/custom hooks used, see [[Template:Extension]] for details --> |
|||
|help = <!-- automatically links to Help:Extension:ExtName if it exists, otherwise enter full wikitext link to end-user docs --> |
|||
|hook2 = |
|||
| |
|example = |
||
| |
|namespace = |
||
| |
|parameters = <!-- configuration parameters, for use in LocalSettings.php --> |
||
| |
|tags = |
||
⚫ | |||
|imagesize = |
|||
| |
|compatibility = |
||
| |
|phabricator = |
||
| |
|vagrant-role = |
||
⚫ | |||
⚫ | |||
|download = |
|||
|readme = |
|||
|changelog = |
|||
|parameters = <!-- configuration parameters, for use in LocalSettings.php --> |
|||
|tags = |
|||
⚫ | |||
|example = |
|||
⚫ | |||
}} |
}} |
||
The '''<includeonly>{{subst:SUBPAGENAME}}</includeonly><noinclude>MyExtension</noinclude>''' extension does foo. |
|||
⚫ | |||
{{ExtensionInstall|registration=true}} |
|||
==What can this extension do?== |
|||
==Usage== |
|||
==Download instructions== |
|||
<!-- revise these instructions if code is available via a download site --> |
|||
Please cut and paste the code found [[#Code|below]] and place it in <code>$IP/extensions/ExtensionName/ExtensionName.php</code>. ''Note: [[Manual:$IP|$IP]] stands for the root directory of your MediaWiki installation, the same directory that holds [[Manual:LocalSettings.php|LocalSettings.php]]''. |
|||
⚫ | |||
To install this extension, add the following to [[Manual:LocalSettings.php|LocalSettings.php]]: |
|||
<source lang="php"> |
|||
#add configuration parameters here |
|||
#setup user rights here |
|||
require_once("$IP/extensions/ExtensionName/ExtensionName.php"); |
|||
</source> |
|||
==Configuration parameters== |
|||
{{ParameterList}} <!-- If your extension is in Wikimedia Gerrit, a bot will automatically fill this out for you --> |
|||
⚫ | |||
<!-- |
|||
⚫ | |||
;$wgMyExtensionFoo: Some description. |
|||
;$wgMyExtensionBar: Some description. |
|||
--> |
|||
===User rights=== |
|||
⚫ | |||
== |
==User rights== |
||
<!-- |
|||
<!-- delete this section if code is available via a download site --> |
|||
⚫ | |||
<source lang="php"> |
|||
--> |
|||
<!-- put your code here - note that the ending ?> tag should not be present, as it's not needed and is likely to cause only problems. This has been since MediaWiki 1.11 and newer releases. --> |
|||
</source> |
|||
==See also== |
==See also== |
||
<!-- |
<!-- Add other related extensions here, if applicable. If not, just delete this comment and the "See also" header. --> |
||
<noinclude>__EXPECTUNUSEDTEMPLATE__</noinclude> |
Latest revision as of 03:30, 11 September 2024
MyExtension Release status: beta |
|
---|---|
License | No license specified |
Download | No link |
Translate the Extension/Sample extension if it is available at translatewiki.net |
The MyExtension extension does foo.
Installation
[edit]- Download and move the extracted
Extension
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Extension - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Extension' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.