Preloader MediaWiki Extension
This repository has been archived on 2022-07-13. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
tengel ae27d4ae7f update readme 2022-06-30 11:38:09 -05:00
i18n Some modernization & code cleanup 2017-09-12 19:37:55 -05:00
CHANGELOG.md Version 1.4 release 2019-07-11 14:53:12 -05:00
LICENSE update copyrights, version 2015-01-03 10:27:49 -06:00
Preloader.class.php Avoid using `Revision::getText()` as this is (deprecated)[https://www.mediawiki.org/wiki/Manual:Revision.php] 2019-02-11 15:52:26 -05:00
Preloader.php Some modernization & code cleanup 2017-09-12 19:37:55 -05:00
README.md update readme 2022-06-30 11:38:09 -05:00
composer.json Add composer.json (fixes #1) 2016-03-17 00:37:12 +01:00
extension.json Version 1.4 release 2019-07-11 14:53:12 -05:00

README.md

Preloader MediaWiki Extension

THIS PROJECT IS UNMAINTAINED

Overview

  1. Introduction
  2. Requirements
  3. Installation
  4. Configuration
  5. Boilerplate
  6. Feedback

1. Introduction

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.

This extension supports the standard <includeonly> and <noinclude> tags in the boilerplate text.

2. Requirements

The Preloader extension requires MediaWiki 1.25.0 or later.

3. Installation

Git - clone the GitLab repository into your extensions subdirectory, then edit your LocalSettings.php file and add the following line:

wfLoadExtension( 'Preloader' );

Installation can be verified through the Special:Version page on your wiki.

4. Configuration

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

$wgPreloaderSource[<namespace index>] = PAGE TITLE;

For instance:

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

...indicates 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.

5. Boilerplate

Using the above example configuration, create the wiki page Template:Boilerplate and use the standard include tags to indicate which parts are the template and which are the generic wiki text:

<includeonly>
__TOC__

== Overview ==

[[Category:MyDefaultCategory]]
</includeonly>
<noinclude>
This template is included by the Preloader extension on new article creation.
</noinclude>

When this template is included into a new wiki page, only this text is included and ready to edit:

__TOC__

== Overview ==

[[Category:MyDefaultCategory]]