[Mediawiki-l] Extension over extension

Iliya Kuznetsov chumpa at yandex.ru
Sun Feb 19 19:55:06 UTC 2006


My own simple extension wants to produce wiki-formatting, for example:

$wgExtensionFunctions[] = "wfABAPEDIA";
function wfABAPEDIA() {
    global $wgParser;
    $wgParser->setHook( "fmsg", "renderFMSG" );
}

function renderFMSG( $input, $argv ) {
    $output = "[[CODE]] Text passed into example extension: <abap>write </abap><br/>$input";
    $output .= " <br/> and the value for the arg 'argument' is " . $argv["argument"];
    $output .= " <br/> and the value for the arg 'argument2' is: " . $argv["argument2"];
    return $output;
}

Using of:

<fmsg argument="1111">123</fmsg>

I've got only 

[[CODE]] Text passed into example extension: write 
123 
and the value for the arg 'argument' is 1111 
and the value for the arg 'argument2' is

not a wiki-format (because renderFMSG produces plain HTML, not a more)

How can I make wiki tags in my own extension?

-- 
Cybernetic Humanoid Used for Mathematics and Potential Assassination
chumpa at yandex.ru                                       icq 122393064




More information about the MediaWiki-l mailing list