jmnote / MultiBoilerplate

Github mirror of MediaWiki extension MultiBoilerplate - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MultiBoilerplate extension for MediaWiki

The MultiBoilerplate extension allows a boilerplate to be selected from a drop down box located above the edit form. By default, this shows only on creation of new pages. When loading a boilerplate, it will completely replace whatever text is already in the edit form.

Dependencies

Version 2.2.0 and later requires MediaWiki >= 1.35.

Installation

See the regular installation instructions for MediaWiki extensions: https://www.mediawiki.org/wiki/Manual:Extensions#Installing_an_extension

Configuration

Main configuration

The main configuration is of the available boilerplates; this is done either:

  • through $wgMultiBoilerplateOptions in LocalSettings.php, by filling the $wgMultiBoilerplateOptions array with a list of boilerplate names that correspond to templates, like so:
    $wgMultiBoilerplateOptions[ "My Boilerplate" ] = "Template:My Boilerplate";
  • Or through system message MediaWiki:Multiboilerplate, which uses the following format:
    My Boilerplate|Template:My Boilerplate
    • You can also create headers to separate boilerplates, which will be transformed to option groups in the edit form drop down. For example:

      == Pretty Templates ==

      • My Boilerplate|Template:My Boilerplate == Ugly Templates ==
        • Their Boilerplate|Template:Their Boilerplate
    • The template pages may also be represented by links, just for convenience, e.g.: * My Boilerplate|[[Template:My Boilerplate]]

Additional configuration options

  • $wgMultiBoilerplateOverwrite: false by default. If true, shows the boilerplates dropdown even on pre-existing page. The selected boilerplate will completed overwrite the current contents.

Usage

  • Select a boilerplate from a dropdown above the edit form
  • View the configured boilerplates at Special:MultiBoilerplates

Change log

See CHANGELOG.md for a complete change log.

Credits

Originally by Robert Leverington (minuteelectron), with additional contributions by Al Maghi, Dror S [FFS] and Jhf2442. See the commit log for a full list of contributers.

About

Github mirror of MediaWiki extension MultiBoilerplate - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

License:Other


Languages

Language:PHP 96.9%Language:JavaScript 3.1%