Sjabloon:ExtensionInstall: verschil tussen versies
interwiki>Kghbln (even moar logic) |
k (1 versie geïmporteerd) |
(geen verschil)
|
Huidige versie van 25 sep 2019 om 13:46
<languages/>
- Download and place the file(s) in a directory called
ExtensionInstall
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Usage
</translate>
Sjabloon:ExtensionInstall/TemplateData
<translate>
Examples
Below a few examples of how to use this template:
Simple
</translate>
{{ExtensionInstall}}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Name
</translate>
{{ExtensionInstall|CategoryTree}}
- Download and place the file(s) in a directory called
CategoryTree
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/CategoryTree/CategoryTree.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Download link
</translate>
{{ExtensionInstall |download-link=[http://bits.wikimedia.org/example.zip Download] }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
LocalSettings
{{ExtensionInstall |localsettings= $wgUseAjax = true; }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php"; $wgUseAjax = true; </syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
LocalSettings early
{{ExtensionInstall |localsettingsearly= $wgUseAjax = true; // this must be included before the extension is loaded }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
$wgUseAjax = true; // this must be included before the extension is loaded require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
DB Update
</translate>
{{ExtensionInstall |db-update=Yes }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Composer
</translate>
{{ExtensionInstall |composer=Yes }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.- Only when installing from git run Composer to install PHP dependencies, by issuing
composer install --no-dev
in the extension directory. (See T173141 for potential complications.)- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Custom steps
</translate>
{{ExtensionInstall |custom-steps= * Lorem ipsum dolor sit amet * Foo bar baz quux [[sandbox]] }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Support registration
</translate>
{{ExtensionInstall |registration=1 }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing this extension using
wfLoadExtension()
. If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of <syntaxhighlight lang="php" inline="true">wfLoadExtension( 'MyExtension' );</syntaxhighlight>, you need to use: <syntaxhighlight lang="php"> require_once "$IP/extensions/MyExtension/MyExtension.php"; </syntaxhighlight>
<translate>
Set recommended registration MediaWiki version
</translate>
{{ExtensionInstall |registration=1 |no-registration-version=1.25 }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.25 or earlier:
The instructions above describe the new way of installing this extension using
wfLoadExtension()
. If you need to install this extension on these earlier versions (MediaWiki 1.25 and earlier), instead of <syntaxhighlight lang="php" inline="true">wfLoadExtension( 'MyExtension' );</syntaxhighlight>, you need to use: <syntaxhighlight lang="php"> require_once "$IP/extensions/MyExtension/MyExtension.php"; </syntaxhighlight>
<translate>
Require registration
</translate>
{{ExtensionInstall |registration=required }}
- Download and place the file(s) in a directory called
MyExtension
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
<translate>
Everything
</translate>
{{ExtensionInstall|Example |download-link=[http://bits.wikimedia.org/example.zip Download] |vagrant=example |localsettings= $wgUseAjax = true; |db-update=Yes |composer=Yes |custom-steps= * Lorem ipsum dolor sit amet * Foo bar baz quux [[sandbox]] |registration=yes }}
- If using Vagrant , install with
vagrant roles enable example --provision
- Manual installation
- Download and place the file(s) in a directory called
Example
in yourextensions/
folder.- Only when installing from git run Composer to install PHP dependencies, by issuing
composer install --no-dev
in the extension directory. (See T173141 for potential complications.)- Add the following code at the bottom of your LocalSettings.php: <syntaxhighlight lang="php">
wfLoadExtension( 'Example' ); $wgUseAjax = true; </syntaxhighlight>
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
- Sjabloon:Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing this extension using
wfLoadExtension()
. If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of <syntaxhighlight lang="php" inline="true">wfLoadExtension( 'Example' );</syntaxhighlight>, you need to use: <syntaxhighlight lang="php"> require_once "$IP/extensions/Example/Example.php"; </syntaxhighlight>
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |
[[Category:Template documentation{{#translation:}}| ]]
[[Category:Installation guide templates{{#translation:}}]]