Extension:Preloader
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. |
![]() Release status: unmaintained |
|
---|---|
Implementation | Page action , Tag |
Description | Loads boilerplate text when creating new pages |
Author(s) | Rob Church, troyengel |
Latest version | 1.3.0 (2018-06-04) |
MediaWiki | 1.25+ |
Database changes | No |
License | MIT License |
Download | GitLab: Note: README |
$wgPreloaderSource |
|
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
- Copy the code into files and place the file(s) in a directory called
Preloader
in yourextensions/
folder. - Add the following code at the bottom of your
LocalSettings.php
:wfLoadExtension( 'Preloader' );
- 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 Gitlab.
See Also
- Extension:Header Footer provides per-namespace header/footer text
- Extension:MultiBoilerplate provides per dropdownlist multiple templates
- Extension:NewArticleTemplate provides per-namespace preload text
- Extension:NamespacePreload
This extension is included in the following packages and/or wiki farms: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |