Content added Content deleted
imported>mutante m (New page: === reverse extension test === geimfyglid> how is that done? <reverse>geimfyglid> how is that done?</reverse>) |
imported>mutante mNo edit summary |
||
Line 1:
=== reverse extension
geimfyglid> how is that done?
<nowiki><reverse>geimfyglid> how is that done?</reverse></nowiki>
<reverse>geimfyglid> how is that done?</reverse>
<HighlightSyntax>
<?php
# <reverse> Mediawiki extension example by mutante
$wgExtensionFunctions[] = "wfReverseExtension";
function wfReverseExtension() {
global $wgParser;
$wgParser->setHook( "reverse", "renderReverse" );
}
function renderReverse( $input ) {
$output=strrev($input);
return $output;
}
?>
</HighlightSyntax>
You need to copy the above to ./extensions/ReverseExtensions.php and add include("extensions/ReverseExtension.php"); to your LocalSettings.php
|
Revision as of 21:49, 2 October 2007
reverse extension for geimfyglid
geimfyglid> how is that done?
<reverse>geimfyglid> how is that done?</reverse>
<reverse>geimfyglid> how is that done?</reverse>
<HighlightSyntax>
<?php
- <reverse> Mediawiki extension example by mutante
$wgExtensionFunctions[] = "wfReverseExtension";
function wfReverseExtension() { global $wgParser; $wgParser->setHook( "reverse", "renderReverse" ); }
function renderReverse( $input ) {
$output=strrev($input);
return $output;
} ?> </HighlightSyntax>
You need to copy the above to ./extensions/ReverseExtensions.php and add include("extensions/ReverseExtension.php"); to your LocalSettings.php