Jump to content

Template:Extension/Sample: Difference between revisions

From mediawiki.org
Content deleted Content added
Don't encourage code-on-wiki
Default {{ExtensionInstall}} to use registration, because its 2024
 
(32 intermediate revisions by 17 users not shown)
Line 1: Line 1:
<!---
<!--
**************************************************************
**************************************************************
Usage instructions:
Usage instructions:
1. Fill in the template. For help, see [[Template:Extension]].
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.

2. Fill in the template. For help, see [[Template:Extension]]
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>
|name =
|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 =
|newhook1 = <!-- hooks added by the extension, see [[Template:Extension]] for details -->
|username = <!-- optional, but strongly recommended -->
|author = <!-- add only if different from user name -->
|newhook2 =
|description = <!-- brief description of purpose/use case -->
|username = <!-- optional, but strongly recommended -->
|author = <!-- add only if different from user name -->
|image =
|description = <!-- brief description of purpose / use case -->
|imagesize =
|version =
|image =
|update =
|imagesize =
|mediawiki =
|version =
|php =
|update =
|version preview =
|license = <!-- what license your extension is released under -->
|download =
|update preview =
|compatibility policy =
|readme =
|mediawiki = <!-- only needed if different from what's in extension.json -->
|changelog =
|php =
|parameters = <!-- configuration parameters, for use in LocalSettings.php -->
|tags =
|needs-updatephp =
|rights = <!-- user rights, for use with $wgGroupPermissions -->
|composer =
|example =
|table1 =
|table2 =
|compatibility =
|license = <!-- what license your extension is released under -->
|download = <includeonly>{{WikimediaDownload|{{subst:SUBPAGENAME}}}}</includeonly>
|readme = <includeonly>{{git file|project=mediawiki/extensions/{{subst:SUBPAGENAME}}|file=README|branch=HEAD|text=README}}</includeonly>
|changelog =
|help = <!-- automatically links to Help:Extension:ExtName if it exists, otherwise enter full wikitext link to end-user docs -->
|example =
|namespace =
|parameters = <!-- configuration parameters, for use in LocalSettings.php -->
|tags =
|rights = <!-- user rights, for use with $wgGroupPermissions -->
|compatibility =
|phabricator =
|vagrant-role =
}}
}}


The '''<includeonly>{{subst:SUBPAGENAME}}</includeonly><noinclude>MyExtension</noinclude>''' extension does foo.
==What can this extension do?==


==Usage==
==Installation==


{{ExtensionInstall|registration=true}}
==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]]''.


==Configuration parameters==
==Installation==
{{ParameterList}} <!-- If your extension is in Wikimedia Gerrit, a bot will automatically fill this out for you -->
To install this extension, add the following to [[Manual:LocalSettings.php|LocalSettings.php]]:
<!--
<source lang="php">
Explain the purpose of each configuration parameter provided to Template:Extension.
#add configuration parameters here
;$wgMyExtensionFoo: Some description.
#setup user rights here
;$wgMyExtensionBar: Some description.
require_once("$IP/extensions/ExtensionName/ExtensionName.php");
</source>


-->
===Configuration parameters===
<!-- Explain the purpose of each configuration parameter provided to Template:Extension -->


===User rights===
==User rights==
<!--
<!-- Explain the purpose of each user right provided to Template:Extension -->
Explain the meaning of each user right provided to Template:Extension.
-->


==See also==
==See also==
<!-- add other related extensions here, if applicable. If not, just delete this comment and the see also-header. -->
<!-- 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


MediaWiki extensions manual
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 your extensions/ 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' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

[edit]

User rights

[edit]

See also

[edit]