Jump to content

Topic on Extension talk:MagicNumberedHeadings

Does not substitute new magic word in templates

1
109.146.177.29 (talkcontribs)

Resolved by (assuming saved in extensions folder with path below).

LocalSettings.php:

require_once($IP.'/extensions/MagicNumberedHeadings/MagicNumberedHeadings.php');

Modify parsing order by editing the extension above (ie MagicNumberedHeadings.php):

replace line 49

$wgHooks['ParserBeforeInternalParse'][] = 'MagicNumberedHeadingsParserBeforeInternalParse';

with

$wgHooks['InternalParseBeforeLinks'][] = 'MagicNumberedHeadingsInternalParseBeforeLinks';

And line 62

function MagicNumberedHeadingsParserBeforeInternalParse( &$parser, &$text, &$strip_state ) {

with

function MagicNumberedHeadingsInternalParseBeforeLinks(&$parser, &$text, &$stripState) {

Finally, update get method by changing line 63

MagicWord::get

to

$parser->getMagicWordFactory()->get

Reply to "Does not substitute new magic word in templates"