Template:ExtensionInstall/doc
From MediaWiki.org
| This is a documentation subpage for Template:ExtensionInstall (see that page for the template itself). It contains usage information, categories, interlanguage links and other content that is not part of the original template page. |
Contents |
Usage [edit]
Parameters are optional!
1=- Set the extension name manually (defaults to the current page name without namespace prefix).
download-link=- Overwrite the download link (defaults to linking to ExtensionDistributor with the extension name)
localsettings=- Pass custom php code that the user should include in LocalSettings.php
db-update=- If the extension has one or more database tables that need to be created through update.php, set this parameter to any value (e.g.
|db-update=1or|db-update=Yes). custom-steps=- Additional steps (as an unordered
* list
Examples [edit]
Below a few examples of how to use this template:
Simple [edit]
{{ExtensionInstall}}
- Download and extract the files in a directory called "
MyExtension" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/MyExtension/MyExtension.php" );
Name [edit]
{{ExtensionInstall|CategoryTree}}
- Download and extract the files in a directory called "
CategoryTree" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/CategoryTree/CategoryTree.php" );
Download link [edit]
{{ExtensionInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
- Download and extract the files in a directory called "
MyExtension" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/MyExtension/MyExtension.php" );
LocalSettings [edit]
{{ExtensionInstall
|localsettings=
$wgUseAjax = true;
$wgEnableMWSuggest = true;
}}
- Download and extract the files in a directory called "
MyExtension" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/MyExtension/MyExtension.php" ); $wgUseAjax = true; $wgEnableMWSuggest = true;
DB Update [edit]
{{ExtensionInstall
|db-update=Yes
}}
- Download and extract the files in a directory called "
MyExtension" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/MyExtension/MyExtension.php" );
- Run the update script which will automatically create the necessary database tables that this extension needs.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Custom steps [edit]
{{ExtensionInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
- Download and extract the files in a directory called "
MyExtension" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/MyExtension/MyExtension.php" );
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Everything [edit]
{{ExtensionInstall|Example
|download-link=[http://bits.wikimedia.org/example.zip Download]
|localsettings=
$wgUseAjax = true;
|db-update=Yes
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
- Download and extract the files in a directory called "
Example" in your extensions/ folder.- Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/Example/Example.php" ); $wgUseAjax = true;
- 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
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.