Add Extensions

From mw.mh370.wiki
Jump to navigation Jump to search

A Guide to Using MediaWiki in a Hosted Environment

An instructional website by the developer of mh370wiki.net - a MediaWiki site about Malaysia Airlines Flight MH370.


MediaWiki has a set of pre-packaged Extensions in the /w/extensions folder. These will be compatible with the MediaWiki version.

Ther are several steps to install other extensions:-

  1. Locate the required extension on the MediaWiki website.
  2. Download the version of the extension which matches your version of MediaWiki.
  3. Bookmark the extension page so you can refer to installation and configuration instructions when needed.
  4. Use a utility like 7-zip to unpack the extension files on your local computer. Extension files are commonly compressed as .tar which is first expanded to .tar.gz and then to a folder with a long name which contains the folder you will actually want.
  5. Use an FTP utility such as Filezilla or CoreFTP to transfer (upload) the extension files to your hosted site.
  6. Copy (or move) the extension folder (to your MediaWiki site) to /w/extensions
  7. Install the extension by adding appropriate line(s) to LocalSettings.php.

Example

Extension:CollapsibleVector

The mh370wiki.net site has a collapsible menu in the left column of the screen. MediaWiki calls that a Sidebar. Sidebar settings, the menu items, are located in the page MediaWiki:Sidebar.

The Vector skin is one of four skins included in the MediaWiki installation and in LocalSettings.php is commonly configured as the default skin:-

## Default skin: you can change the default skin. Use the internal symbolic
## names, e.g. 'vector' or 'monobook':
$wgDefaultSkin = "vector";

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MinervaNeue' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );

However, the [CollapsibleVector] extension is not included. The Extension page Extension:CollapsibleVector has the details. The download link takes you to a page Download MediaWiki extension which presents the current version:-

However, this website currently uses MediaWiki version 1.43.1 LTS, so it would be wise to select that option:-

Read the instruction page and save the download locally.

The download looks like this:-

Using 7-zip the first extraction is to the folder CollapsibleVector-REL1_43-305a7e6.tar which contains a file named CollapsibleVector-REL1_43-305a7e6

Using 7-zip again, the files are extracted to a folder named CollapsibleVector-REL1_43-305a7e6 which contains a folder named CollapsibleVector.

Use FTP to transfer this folder and contents to your hosted site. Check that the number of files transferred is correct. Fix any errors.

At your hosted site use cPanel --> File Manager to copy (or move) the CollapsibleVector folder to /w/extensions

In File manager select LocalSettings.php and Edit. Scroll to the end.

Referring to the installation instructions for the CollapsibleVector Extension, add the line wfLoadExtension( 'CollapsibleVector' );

My LocalSettings.php file looks like this:-

I find it useful to group extensions:-

  1. Extensions which are packaged with MediaWiki. When MediaWiki is upgraded to a newer version these xtensions will likely be included.
  2. Extensions which I have downloaded and installed. Before the next upgrade I will check that newer versions are available and will download them for installation in the new version of MediaWiki.

Actually, I try to keep extra extensions to a minimum, particularly on a site like mh370wiki.net. This is mainly because I have previously used extensions which were not maintained so I learnt the hard way not to be reliant on extensions outside of the standard set.

At this stage of development, the menu on this site looks like this:-

The only menu item with any sub-items is Tools, which can be expanded:-

To add items to the Menu see Customise the Menu.



Links

Manual:Extensions
https://www.mediawiki.org/wiki/Manual:Extensions