Extension:ParserFunctions

Other languages:
Deutsch 0% • ‎English 100% • ‎français 0% • ‎日本語 46% • ‎한국어 0% • ‎मराठी 0% • ‎русский 0%
MediaWiki extensions manual - list
Crystal Clear action run.png
ParserFunctions

Release status: stable

Implementation Parser function
Description Enhances parser with logical and string functions
Author(s) Tim Starlingtalk
Latest version 1.6.0 (2014-03-28)
MediaWiki 1.19+
Database changes No
License GPLv2
Download
README
Parameters
  • $wgPFStringLengthLimit
  • $wgPFEnableStringFunctions
Hooks used
ParserFirstCallInit

UnitTestsList

Translate the ParserFunctions extension if possible

Check usage and version matrix; code metrics
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).

UsageEdit

For usage instructions, see the ParserFunctions help page, and the StringFunctions page.

InstallationEdit

This extension is bundled with MediaWiki 1.18 and above. Thus you do not have do download and extract the extension as described. However, you still need to follow the other instructions provided.
  • Download and extract the files in a directory called ParserFunctions in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository using:
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ParserFunctions.git
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
  • Configure as required, e.g. if you want to use the integrated string function functionality, add just after that line:
$wgPFEnableStringFunctions = true;
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

ConfigurationEdit

$wgPFEnableStringFunctions
Allows to activate the integrated string function functionality (see StringFunctions). The default value is false.
$wgPFStringLengthLimit
Defines the maximum length of a string that string functions are allowed to operate on. The default value is 1000.

See alsoEdit



Last modified on 20 April 2014, at 18:56