Template:New MediaWiki tag extension
***Use subst: for Template:New MediaWiki extension below***
| NAME Release status: beta | |
|---|---|
| Type: | Parser extension |
| Description: | . |
| Author: | Eric Hartwell |
| Version: | 0.5 |
| MediaWiki: | Tested on |
| Download: | Code (this article) |
|
[edit] What can this extension do?
[edit] Usage
[edit] Installation
[edit] Parameters
[edit] Changes to LocalSettings.php
require_once("$IP/extensions/NAME/NAME.php");
[edit] Code
<?php /** * NAME.php * This Extension does ....... * written by Eric Hartwell http://www.ehartwell.com/about * To activate the functionality of this extension include the following in your * LocalSettings.php file: * require_once('$IP/extensions/NAME/NAME.php'); */ if(! defined( 'MEDIAWIKI' ) ) { echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); die( -1 ); } else { // Replace validextensionclass with: specialpage, parserhook, variable (multiple functionality), other $wgExtensionCredits['validextensionclass'][] = array( 'name' => 'NAME', 'author' =>'Eric Hartwell', 'url' => 'http://www.ehartwell.com', 'description' => 'This Extension is an example and performs no discernable function', ); $wgExtensionFunctions[] = 'efNAMESetup'; function efNAMESetup() { global $wgParser; $wgParser->setHook( 'NAME', 'efNAMERender' ); } function efNAMERender( $input, $args, $parser ) { // Nothing exciting here, just escape the user-provided // input and throw it back out again return htmlspecialchars( $input ); } ?>