ParserPower

From Aeon Garden Software Wiki
Jump to: navigation, search

Download

Version Release Date Location Known Compatibility
0.95 (Latest) 2014 September 28 http://sw.aeongarden.com/download/ParserPower-0.95.zip MediaWiki 1.19 to 1.23
0.9 2014 January 7[1] http://sw.aeongarden.com/download/ParserPower-0.9.zip MediaWiki 1.19 to 1.23
  1. This version was originally released only on Gamepedia wikis

Description

ParserPower is a MediaWiki extension providing additional tags and parser functions that aid in many template and other wikicoding scenarios. In particular, it has list-handling functions that can eliminate the need for redundant, copy-paste coding in cases where a template may need to accept multiple values for a single item. It also provides escape sequences that provide easier ways to deal with certain issues with whitespace or other wikicode characters in functions and tags. It also adds some other useful utility functions.

Installation

  1. Extract this extension to the extensions subdirectory of your MediaWiki installation directory. It should be contained in a ParserPower subdirectory within extensions.
  2. Add the following line to LocalSettings.php:
    require_once( "{$IP}/extensions/ParserPower/ParserPower.php" );

Configuration

As of version 0.95, there are no configuration options.

Overview

ParserPower is an extension that adds a number of useful tags and parser functions to MediaWiki. It is most powerful when combined with other useful and common extensions such as ParserFunctions and Variables.

There are two particular sets of helpful features in ParserPower: functions for processing lists of values and support for escape sequences.

The list-handling functions are useful whenever you need a template to deal with some subject that may involve some arbitrary number of values. Often, this is done by supplying multiple parameters, such as item1, item2, item3, and so on, but if anything even slightly complicated needs to be done with each value, you end up either copy and pasting a lot of code for each value, or you end up writing a separate template. Either way, you still have to guess how many values you'll need. With ParserPower's list-handling functions, you can just give multiple values to a single parameter, separating them with a specific character, such as a comma, and writing the code once for each value.

Escape sequences are short groups of characters that represent a different character that may have special meaning, behavior, or effects when used directly in particular contexts. A common example is trying to use the pipe character (|) in a parameter to a template, which doesn't work because that normally separates parameter values, and the classic Template:! used as a workaround, which is essentially a crude way of escaping the pipe characters. ParserPower functions use escape sequences to help in working around these issues, often more easily and more readably than other solutions would allow. Additionally, there is the #uesc function simply for processing escape sequences, which can be useful in using escape sequences in other tags and functions, and the <esc> tag that can do the escaping for you when needed.

Usage

For usage instructions, refer to pages from the manual as listed below.

Version History

Version Release Date Changes
0.95 2014 September 28 Many new features added, include changes to existing functions and new functions and tags. Solved known issues with 0.9 noted below.
0.9 2014 January 7 Quiet release of the extension on Gamepedia wikis.

Known issues

Version 0.9

#listsort returning an empty value when using a pattern with a single token

The #listsort function would erroneously return nothing when using the pattern parameter with only a single token identified in token. The cause was identified and corrected in version 0.95.

<linkpage> and <linktext> results not usable in templates, functions, or tags (fixed in 0.95)

Results from <linkpage> and <linktext> tags could be used only for direct, immediate output to the page. Attempting to use these results in any other matter would result in the value being blank because extension tags normally output fully rendered content as opposed to wikitext that can be further processed. In version 0.95, these have been changed to a lesser-used type of extension tag and now output their results as wikitext.