Extension:PagesfromTemplate
|
PagesfromTemplate Release status: beta |
|
|---|---|
![]() |
|
| Implementation | Special page |
| Description | Create a set of pages by splitting a template (or a normal wiki article) with parameters passing. Operates only for users who have the right to import pages from a file (importupload). The template must be edit protected. |
| Author(s) | Eric Larcher |
| Last version | 1.0 |
| MediaWiki | only tested on 1.12 and 1.13 |
| License | GPL |
| Download | PagefromTemplate.1.0.tar.gz |
| Example | see below Sites using this extension |
|
Check usage (experimental) |
|
This extension appears in the Special:SpecialPages page list under the name Divide a template in pages (en). It create a set of pages by splitting a template (or a normal wiki article) with parameters passing. It can be used at the browser’s command line or within wiki text. Only users who have the right to import pages from a file (importupload) can use it. And the template must be edit protected.
Contents |
[edit] Description
The Divide a template in pages extension expects a wiki page, and eventually optional parameters, as argument(s). It can be used at the browser’s command line or within wiki text.
Example 1: [[Special:Pagesfromtemplate/My Template,parm1=value1]]
Example 2: [[Special:Pagesfromtemplate/Talk:My Discussion,parm1=value1]]
Example 3: [[Special:Pagesfromtemplate/:My Page,parm1=value1,parm2=value2]]
Example 4 (Browser URL): http://mydomain/mywiki/index.php?Special:Pagesfromtemplate/:My_Page,parm1=value1
The Divide a template in pages extension will call the given page and pass the parameters. You will see then accounts of the action. The contents you see may vary depending on the value of the parameters you passed.
This extension should be usefull for rapid update of a pages bunch without using Special:Export, nor the Pywikipedia library. In case of problems you can try Special:Pagesfromtemplate/DebuG
[edit] Parameters
Except the template's name, autorized arguments are the following :
start=xxx Specify the text that is the beginning of a page, by default
{{-start-}} ; end=xxx Specify the text that is the end of a page, by default
{{-stop-}} ; include Specify that the markers of the begining and the end text
should be included in the page ; titlestart=xxx Use the marker xxx in place of ;;; to
identify the beginning of page title ; titleend=xxx Use the marker xxx in place of ;;; to
identify the end of page title; summary=xxx Use \'\'\'xxx\'\'\' as the summary for the operation ; help Show this information.
If a page defined by the template exists :
safe do nothing (default) ; appendtop add the text to the top of the page ; appendbottom add the text to the bottom of the page ; force overwrite the existing page ; title do include the title line in the page ; norc Don\'t update recent changes.
[edit] How it look like
Click on this link to go to the Diviser un modèle en page (fr) page of ericlarcher.fr.
[edit] Installation
- Download PagesfromTemplate.1.0.tar.gz package (see the infobox for download links), and untar this archive. Rename this directory to PagesfromTemplate and copy it into your extensions directory.
- Add the following sentence to your LocalSettings.php:
require_once( "$IP/extensions/PagesfromTemplate/PagesfromTemplate.php" );
[edit] Known todo
- More Internationalization : in release 1.0, language providing are only English and French ;
- Improve the redaction quality's of the messages ;
- Implement Alias names ;
- Implement parameters to do literals replacements during the split operation (ie. replacement depending of page cibles's context).
- display a message even no is created ;
- accept parameters in Uppercase (ie Help or HELP, for help, START for start...) ;
- better presentation in the Special:Version page ;
- run the option help even no template's name is given ;
- display Special:PagesfromTemplate in tools page section of Special:SpecialPages.

