Code Monkey home page Code Monkey logo

extensioninstaller's Introduction

Note: As of MediaWiki 1.22, you can use this extension to install extensions directly into MediaWiki itself. This will not work for older MediaWiki versions. See the Composer page on MediaWiki.org for more information.

MediaWiki extension "Extension Installer"

This is a MediaWiki extension that allows installing other extensions via the Composer dependency manager. You can specify the extensions you want to have installed, and their versions, in a simple list. When this is done, you run the install command, and the extensions get downloaded, and loaded. Dependencies of extensions get downloaded automatically and do not have to be specified. If there are any conflicts between versions of the various software, you will be notified of these conflicts, and thus also do not need to bother wth this manually.

Blog post: MediaWiki extension installer

Support for this extension is available at the GitHub issue tracker of this extension.

Steps to take

Download and install this extension

You can get the extension via Git:

git clone https://github.com/JeroenDeDauw/ExtensionInstaller.git

Or download it as zip archive.

In either case, the "ExtensionInstaller" directory should end up in the "extensions" directory of your MediaWiki installation. If you got the zip archive, you will need to rename the directory from ExtensionInstaller-master to ExtensionInstaller.

Add the following line to the end of your LocalSettings file:

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

Install Composer

Download Composer. See the instructions on that download page for all options. Important to note is that one can simply get the composer.phar file and run composer via this file.

wget http://getcomposer.org/composer.phar
php composer.phar someCommand

This is equivalent to doing an actually installation of Composer and the running

composer someCommand

Specify the extensions to be installed

Copy the example.json file to a new file named composer.json.

In this file, add the extensions you want to install in the "require" section. See "declaring dependencies" and "package setup". Or have a look at the examples below.

The default contents of the json file specifies nothing should be installed, and looks as follows:

{
	"require": {
		"php": ">=5.3.2"
	}
}

Adding version 1.0 or later of the SubPageList extension requires adding a single line:

{
	"require": {
		"php": ">=5.3.2",
		"mediawiki/sub-page-list": ">=1.0"
	}
}

The following example also adds the latest matching version of Semantic MediaWiki:

{
	"require": {
		"php": ">=5.3.2",
		"mediawiki/sub-page-list": ">=1.0",
		"mediawiki/semantic-media-wiki": "*"
	}
}

Each line, except the last one, should have a comma at the end.

Supported extensions

Extensions need to support installation via Composer before they can be installed via ExtensionInstaller. At present this list is not that big. Most of these extensions, and the package names that should be used in the json file, can be found on Packagist, the main Composer package repository.

Installing the extensions

Execute "composer install" in the ExtensionInstaller directory, and see the magic happen. In case you got the composer.phar file, the command is "php composer.phar install".

That's it! Hit Special:Version and you should see the extensions installed.

Note that some extensions might require further setup and configuration before they are usable.

Updating extensions

Once extensions have been installed, you might want to add additional ones, change the version of existing ones, or perhaps remove a few. Just update the list in the json file and run "composer update" or "php composer.phar update" respectively.

extensioninstaller's People

Contributors

jeroendedauw avatar kghbln avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.