From wiki
Revision as of 12:03, 28 May 2013 by Necromancer (Talk | contribs) (Created page with "{{extension |name = ParserFunctions |status = stable |type1 = parser function |hook1 = ParserFirstCallInit |mediawiki = 1.7+ |needs-updatephp = No |version = 1.5.1 |update= 20...")
unstable|experimental|beta|stable|magic=stable | #default=unknown
}}" cellspacing="0" |
|||||||
[[File:{{#ifeq: stable |unstable|Crystal Clear app error.png|Crystal Clear action run.png}}|link=:Template:Extension#Content|left|40px]] ParserFunctions Release status: {{#switch: stable |
unstable|experimental|beta|stable|magic=stable | #default=unknown
}}{{#ifeq:|nocats||[[Category:{{#switch: stable |
experimental|stable = stable extensions | beta = beta status extensions | unknown = extensions with unknown status | unmaintained = Not LTS ready | #default = extensions with invalid status
}}Template:Translation]]}} | |
---|---|---|---|---|---|---|---|---|
[[Image:{{{image}}}|220px]] | ||||||||
Implementation | nocats|Template:Foreach|Template:Foreach}}|{{#ifeq:|nocats | Template:Extension/TypeSwitch}} | ||||||
Description | Enhances parser with logical and string functions | |||||||
Author(s) | {{#ifeq: Tim Starling|Tim Starling | {{{author}}} (}}Tim StarlingTalk{{#ifeq: Tim Starling|Tim Starling | {{{author}}}}} | |||||
Last version | (2013-01-06)}} | |||||||
MediaWiki | 1.7+ | |||||||
PHP | {{{php}}} | |||||||
Database changes<abbr/> | No | |||||||
Schema registration<abbr/> | yes|{{{schema-registry}}}}} | |||||||
License | {{#if:GPL2 or Template:Tim Starling license|GPL2 or Template:Tim Starling license|No license specified{{#if: | [[Category:Extensions with no license specifiedTemplate:Translation]]}}}} | ||||||
Download | {{#if:Template:WikimediaDownload|Template:WikimediaDownload|No link}}{{#if:README| README}}{{#if:CHANGELOG| CHANGELOG}} | |||||||
Example | {{{example}}} | |||||||
Namespace | ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
{{{compatibility}}} | ||||||||
{{#if:{{#ifeq:|nocats | no usage | no usage
}} {{#ifeq:|nousage |
no usage
}} }} |
Check usage and version matrix}} | ||||
Bugs: list open list all report}} |
The ParserFunctions extension enhances the wikitext parser with helpful functions, mostly related to logic and string-handling. Since MediaWiki 1.15, ParserFunctions has incorporated most (but not all) of the functions from the StringFunctions extension, which may be enabled or disabled (see install instructions hereafter).
Usage
For usage instructions, see the ParserFunctions help page, and the StringFunctions page.
Installation
- Download the files from Git or download a snapshot. Choose the version that matches your version of MediaWiki.
- Create a directory
ParserFunctions
in your$IP/extensions
directory. - Extract the files to this
$IP/extensions/ParserFunctions
directory. - Add to the bottom of LocalSettings.php:<syntaxhighlight lang="php" enclose="div">require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );</syntaxhighlight>
- If you want to use the integrated string function functionality, add just after that line <syntaxhighlight lang="php">$wgPFEnableStringFunctions = true;</syntaxhighlight>
- Installation can now be verified through Special:Version of your wiki.