Template:ExtensionInstall

From MediaWiki.org
Jump to: navigation, search

Other languages:
বাংলা • ‎Deutsch • ‎English • ‎español • ‎فارسی • ‎français • ‎galego • ‎magyar • ‎日本語 • ‎한국어 • ‎македонски • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎українська • ‎中文
  • Download and place the file(s) in a directory called ExtensionInstall in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Documentation icon Template documentation

Usage

Add instructions about installing an extension.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Extension name1

Set the extension name manually.

Default
The current page name without namespace prefix.
Example
empty
Auto value
{{ROOTPAGENAME}}, i.e. the page name without namespace nor subpages
Stringoptional
Vagrant role namevagrant

If given, shows how to install extension with the vagrant's enable-role command

Default
empty
Example
empty
Auto value
empty
Stringoptional
Download linkdownload-link

Overwrite the download link.

Default
Link to ExtensionDistributor with the extension name.
Example
empty
Auto value
empty
URLoptional
LocalSettingslocalsettings

Pass custom php code that the user should include in [[LocalSettings.php]].

Default
empty
Example
$wgUseAjax = true;
Auto value
empty
Unknownoptional
Database updatedb-update

If the extension has one or more database tables that need to be created through [[update.php]], set this parameter to any value.

Default
false
Example
empty
Auto value
empty
Booleanoptional
Composercomposer

If the extension uses [[Composer]] to manage dependencies, set this parameter to any value.

Default
false
Example
empty
Auto value
empty
Booleanoptional
Custom steps 0custom-steps0

Additional steps before download, e.g. other required extensions (as an unordered "* list")

Default
empty
Example
empty
Auto value
empty
Contentoptional
Custom stepscustom-steps

Additional steps (as an unordered "* list")

Default
empty
Example
empty
Auto value
empty
Contentoptional
Supports registrationregistration

Changes the template to use wfLoadExtension() if it supports registration. Set to any value if the extension supports registration, or to required if it only supports registration and doesn't support the old-style of loading.

Default
empty
Example
empty
Auto value
empty
Stringoptional
No registration versionno-registration-version

The MediaWiki version for which extension registration should not be used

Default
1.24
Example
empty
Auto value
empty
Unknownoptional

Examples

Below a few examples of how to use this template:

Simple

{{ExtensionInstall}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Name

{{ExtensionInstall|CategoryTree}}
  • Download and place the file(s) in a directory called CategoryTree in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/CategoryTree/CategoryTree.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Download link

{{ExtensionInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • YesY 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 your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    $wgUseAjax = true;
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

DB Update

{{ExtensionInstall
|db-update=Yes
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Composer

{{ExtensionInstall
|composer=Yes
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Run Composer to install PHP dependencies, by issuing composer install in the extension directory. (See T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Custom steps

{{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 your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Support registration

{{ExtensionInstall
|registration=1
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MyExtension' );
    
  • YesY 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 wfLoadExtension( 'MyExtension' );, you need to use:

require_once "$IP/extensions/MyExtension/MyExtension.php";

Set recommended registration MediaWiki version

{{ExtensionInstall
|registration=1
|no-registration-version=1.25
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MyExtension' );
    
  • YesY 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 wfLoadExtension( 'MyExtension' );, you need to use:

require_once "$IP/extensions/MyExtension/MyExtension.php";

Require registration

{{ExtensionInstall
|registration=required
}}
  • Download and place the file(s) in a directory called MyExtension in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MyExtension' );
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Everything

{{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
}}

Manual installation

  • Download and place the file(s) in a directory called Example in your extensions/ folder.
  • Run Composer to install PHP dependencies, by issuing composer install in the extension directory. (See T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Example' );
    $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
  • YesY 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 wfLoadExtension( 'Example' );, you need to use:

require_once "$IP/extensions/Example/Example.php";