Extension:Boilerplatefactory
|
Boilerplatefactory Release status: experimental |
|||
|---|---|---|---|
| Implementation | Page action, Tag | ||
| Description | Load boilerplate from different pages text when creating new pages | ||
| Author(s) | klml | ||
| Last version | 0.2 (2010-03-24) | ||
| MediaWiki | 1.7.0+ | ||
| License | GPL | ||
| Download | Project page Download master snapshot |
||
|
|||
| Check usage and version matrix | |||
The Boilerplatefactory extension allows to select different pages as a boilerplate. You can choose from specified categories in an extra Special pages bevor editing new pages. You can use it to generate huge documents from many small Boilerplates
This Extension offers all Pages from Categories in one Root-Category (default: Category:Boilerplatefactory or change ist in LocalSettings.php) as boilerplates.
Im using:
- API categorymembers with internally API Calling to get the categorymembers
- Manual:Hooks/EditFormPreloadText to handle them to the new page
- optional: Template {{subst:
- respects noinclude
Contents |
Bugs [edit]
Be careful with 2 bugs:
- Only put Categories into Root-Category, no Articles
- Namespace 0 (Artikle without prefix) will give template without
:in{{:Article
ToDo [edit]
liability [edit]
- #Bugs!
- using POST instead of GET
Nice to have [edit]
- sorting categories
- Using additinally Extension:UrlGetParameters für Pagename or settings
Requirements [edit]
The Preloader extension requires MediaWiki 1.7.0 or later.
Installation [edit]
- Download all extension files from github.com and place them in a Boilerplatefactory directory within your MediaWiki extensions directory
- Edit LocalSettings.php and add the line
require_once( "{$IP}/extensions/Boilerplatefactory/Boilerplatefactory.php" );$wgBoilerplatefactorycategorie = 'Kategorie:Test' ;root Category for included Categories (default:Category:Boilerplatefactory).$wgBoilerplatefactorydefaultpage = date( 'ym' ).'.dd_' ;for a Pagename proposal in the new Page
Installation can be verified through the Special:Version page.
Configuration [edit]
Configuration of the boilerplate sources categories is done via the wgBoilerplatefactorycategories configuration variable, which takes the following format:
$wgBoilerplatefactorycategories[ ] = CATEGORY TITLE ;
For instance,
$wgBoilerplatefactorycategories[] = "Category:Outdoorproject"; $wgBoilerplatefactorycategories[] = "Category:Overnightproject";
dictates that these categories are selectable as boilerplate text for pages.
Provides 'optionally a default Pagename:
$wgBoilerplatefactorydefaultpage = defaultname ;
$wgBoilerplatefactorydefaultpage = date( 'Y-m-d' ).'-Projekt';
Provides 'optionally a Namespace:
$wgBoilerplatefactorynamespace = namespace;
$wgBoilerplatefactorynamespace = '104';
Skin [edit]
You can use some css.
This for doubled column:
#boilerplatefactory div { width:50%; float:left; }
See Also [edit]
- Extension:Boilerplate provides single preload template text
- Extension:Preloader
- Extension:PreloadManager provides per-namespace preload text
- Extension:HeaderFooter provides per-namespace header/footer text
- Extension:NewArticleTemplates provides per-namespace preload text
perhaps Extension:Preloader, Extension:PreloadManager, Extension:NewArticleTemplates and Extension:Boilerplate should be merged?
