Extension:Preloader

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:MIT licensed extensions
MediaWiki extensions manual
Preloader
Release status: stableCategory:Stable extensions
Implementation Page action Category:Page action extensions, Tag Category:Tag extensions
Description Loads boilerplate text when creating new pages
Author(s) Rob Church, troyengel
Maintainer(s) Universal Omegatalk
Latest version 1.4.0 (2023-11-13)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
Database changes No
License MIT License
Download Category:Extensions in GitHub version control
README
$wgPreloaderSource
Category:All extensionsCategory:Extensions not in ExtensionJson

The Preloader extension allows the creation of boilerplate text which will be inserted into the edit form when creating new pages. Different boilerplate text can be specified for different namespaces.

In addition, a new parser tag, <nopreload> is introduced, which is used to denote sections which should not be preloaded, ever; useful for instructions and advice on the boilerplate pages. This tag has no effect during a regular parse operation.

Installation

  • Extract archive content and place the file(s) in a directory called Preloader in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Preloader' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

Configuration of the boilerplate sources is done via the $wgPreloaderSource configuration variable, which takes the following format:

$wgPreloaderSource[ NAMESPACE ] = PAGE TITLE;

For instance,

$wgPreloaderSource[ NS_MAIN ] = 'Template:Boilerplate';
$wgPreloaderSource[ NS_HELP ] = 'Template:Boilerplate help';

dictates that the boilerplate text for pages in the main namespace should be loaded from Template:Boilerplate, while pages in the Help namespace will be preloaded from Template:Boilerplate_help. Other namespaces have no boilerplate configured.

Feedback

Please submit comments, suggestions and bug reports on Github.

See Also

Category:Page creation extensions
Category:All extensions Category:EditFormPreloadText extensions Category:Extensions in GitHub version control Category:Extensions included in Miraheze Category:Extensions included in WikiForge Category:Extensions not in ExtensionJson Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:MIT licensed extensions Category:Page action extensions Category:Page creation extensions Category:Stable extensions Category:Tag extensions