* Chad <[email protected]> [Mon, 19 Apr 2010 13:10:46 +0200]:
> There's no hook or other way to extend the current magic links. The
only
> way to add it would be by changing Parser::doMagicLinks().
>
Perhaps something like this (an extension, core is unmodified):
$wgParserConf['class'] = 'MyParser';
class MyParser extends Parser {
function doMagicLinks( $text ) {
...
parent::doMagicLinks( $text );
...
}
function _checkMagicWords( &$text ) {
$man = false;
$mw = MagicWord::get( 'MAN' );
if ( $mw->matchAndRemove( $text ) ) {
$man = true;
...
}
return $man;
}
}
Dmitriy
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l