Author: jasonspiro4
Description:
It would be great if, when someone includes extensions inside a MediaWiki tarball, then MediaWiki could install them when users run the config process.
Version: unspecified
Severity: enhancement
• bzimport | |
Jul 15 2007, 10:47 PM |
F4164: config.php | |
Nov 21 2014, 9:52 PM |
F4163: diff.txt | |
Nov 21 2014, 9:52 PM |
Author: jasonspiro4
Description:
It would be great if, when someone includes extensions inside a MediaWiki tarball, then MediaWiki could install them when users run the config process.
Version: unspecified
Severity: enhancement
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Feature | None | T33279 Installer: extensions improvements: descriptions, alternatives, multiselection, configuration (tracking) | ||
Resolved | None | T11034 Bundle anti-spam extensions in distribution packages | |||
Resolved | None | T12596 Please let installer auto-enable extensions bundled in a MediaWiki tarball | |||
Resolved | None | T22628 New-installer branch (tracking) |
Patch to allow install script to install extensions
This patch allows extensions to be installed by the install script. To configure your extension for installation, create a file called /extensions/config.php and add some content like this:
<?php
$extension_config = array();
$extension_config[] = array(
'label' => 'Parser Functions', 'description' => 'You may choose to install the <a href="http://meta.wikimedia.org/wiki/Help:ParserFunctions">ParserFunctions</a> extension by enabling this option. The ParserFunctions extension is installed on all Wikimedia Foundation wikis (such as the Wikipedia), and installing them allows more flexible control over page output.', 'file' => 'ParserFunctions/ParserFunctions.php', # the location of the file in the extensions directory 'config' => '', # extra stuff for LocalSettings like global variables 'download' => 'http://meta.wikimedia.org/wiki/Help:ParserFunctions'
);
The install script reads this file and gives the user the option to enable extensions defined here. The name, label, and file fields are required. The installation process will comment out extensions that can't be found at the given path. Ideally during the install process the installer would attempt to go get the extension from the download link and install it for the user.
Attached:
Seeing as how this might not be included in the core any time soon, I made the patch into more of an extension to the installer. See http://www.mediawiki.org/wiki/Extension:ExtensionInstaller.