Extension:ParserFunctionsHelper

Purpose
Provides services to parser function extensions which require inserting content after the parsing phase.

This extension is meant to serve other extensions i.e. it does not provide end-user functionality by itself.

Motivation
Parser functions can insert content during the parsing phase albeit not raw content i.e. content which should end-up untouched in the output page.

This extension allows for registering raw content which will replace anchors in the parsed wikitext.

Usage
Normally used in the render functions of parser functions and tag extensions.

function tagExtensionOrParserFunction_Render { $key = 'pick-a-name'; $value = 'html output that needs protection from wikiization'; $index = null; $anchor = null; wfRunHooks( 'ParserFunctionsHelperSet',             array( $key, $value, &$index, &$anchor ) );

if ( $anchor === null) { return '[http://www.mediawiki.org/wiki/Extension:ParserFunctionsHelper '. 'Extension:ParserFunctionHelper] missing.'; } return $anchor; }

ParserFunctionsHelperSet Parameters

 * $key: normally a name that describes the content you wish to output.
 * $value: HTML content that you need to protect from wikiization.
 * $index: Parameter is used to return data. Passed-in data will be ignored. Parameter that gives you the index of the store that your data is store in. Useless for most people's needs.
 * $anchor: Parameter is used to return data. Passed-in data will be ignored. The $anchor is what you output onto the wiki page. The anchor is a unique marker that will be replaced with your html during the ParserAfterTidy Stage

Dependancy

 * StubManager extension