I'm writing a Mediawiki extension (http://mediawiki.pastey.net/28186) that changes text like "[[X::R::Y]]" to "[[Y]]", and then displays X and R at the bottom the page in a clever way (it's a semantic/RDF extension, because I'm not crazy about the existing Semantic Mediawiki).
To do this, I did:
$wgHooks['ParserBeforeStrip'][] = 'myInternalParseBeforeLinks';
where myInternalParseBeforeLinks(&$parser, &$text) appends "foo" to $text.
This works great for the main article, but "foo" also gets appended to my page footer:
# This page was last modified 16:57, 6 May 2007. This page has been accessed 56 times. {whatever "foo" I added appears here too}
When I create or edit a page, it's even worse: "foo" appears all over the place.
How do I get my hook to JUST add "foo" to the main article and nothing else? As you can tell from the hook name, I originally tried to add this as a InternalParseBeforeLinks hook, but that didn't work either.
Are these the correct lists to ask on?
mediawiki-l@lists.wikimedia.org