Github mirror of MediaWiki extension MultiBoilerplate - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing
Go to file
libraryupgrader c6778ce886 build: Updating grunt-banana-checker to 0.13.0
Change-Id: Id93de59a9dbbcc941de436265ff431ed28ad5e3d
2024-05-18 18:29:11 +00:00
i18n Localisation updates from https://translatewiki.net. 2024-04-15 09:28:24 +02:00
includes Replace deprecated Parser::getFreshParser 2023-10-03 17:42:09 +02:00
.eslintrc.json build: Updating eslint-config-wikimedia to 0.19.0 2021-03-14 03:12:45 +00:00
.gitignore build: Replace jsonlint with eslint 2021-02-20 21:30:46 +01:00
.gitreview Modernize the code base 2022-02-08 14:45:08 +02:00
.phpcs.xml build: Updating dependencies 2022-05-21 07:55:42 +00:00
CHANGELOG.md Modernize the code base 2022-02-08 14:45:08 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 05:51:42 +00:00
Gruntfile.js build: Replace jsonlint with eslint 2021-02-20 21:30:46 +01:00
LICENSE Refactor to modern standards 2015-02-06 01:34:19 +02:00
MultiBoilerplate.alias.php Add alias for Chinese (Both) 2022-07-25 06:08:27 +00:00
README.md Modernize the code base 2022-02-08 14:45:08 +02:00
composer.json build: Updating composer dependencies 2024-05-05 22:57:01 +00:00
extension.json Replace deprecated Parser::getFreshParser 2023-10-03 17:42:09 +02:00
package-lock.json build: Updating grunt-banana-checker to 0.13.0 2024-05-18 18:29:11 +00:00
package.json build: Updating grunt-banana-checker to 0.13.0 2024-05-18 18:29:11 +00:00

README.md

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.