Extension:ParserFunctions

From MediaWiki.org
Jump to: navigation, search
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
Last version 1.5.1 (2013-01-06)
MediaWiki 1.7+
Database changes No
License GPLv2
Download
README
Parameters
  • $wgPFStringLengthLimit
  • $wgPFEnableStringFunctions
Hooks used
ParserFirstCallInit

UnitTestsList

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

Usage[edit | edit source]

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

Installation[edit | edit source]

This extension is bundled with MediaWiki 1.18 and above (to enable it skip directly to step 4 below). Steps 1 to 3 only apply to previous versions of MediaWiki.
  1. Download the files from Git or download a snapshot. Choose the version that matches your version of MediaWiki.
  2. Create a directory ParserFunctions in your $IP/extensions directory.
  3. Extract the files to this $IP/extensions/ParserFunctions directory.
  4. Add to the bottom of LocalSettings.php:
    require_once "$IP/extensions/ParserFunctions/ParserFunctions.php";
    
  5. If you want to use the integrated string function functionality, add just after that line
    $wgPFEnableStringFunctions = true;
    
  6. Installation can now be verified through Special:Version of your wiki.

Configuration[edit | edit source]

$wgPFEnableStringFunctions
Allows to activate the integrated string function functionality. 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 also[edit | edit source]


Language: English  • Deutsch • français • 日本語 • 한국어 • मराठी • русский