On 28/10/2007, Thomas Dalton <thomas.dalton(a)gmail.com> wrote:
I match the
wanted tags by using following syntax...
function wfRenderArticleSectionCheck($input, $args, &$parser) {
global $wgTitle, $wgArticle, $wgParser, $wgLang, $wgLanguageCode;
$lan = $wgLang->getCode();
if($args[lan] == $lan) {
return $input;
} else {
return '';
}
}
The empty space is conform with the entire space the non-matched content would
take up...
So you have tags around all the content saying what language it's in,
and only the correct language should be displayed?
I can't see why there would be blank space, your code looks correct to
me. Do you have a demo website where I can see it running?
Actually, I say it looks correct - what hook are you using? I've never
written a tag extension, but the method described on [[Manual:Tag
extensions]] (on
mediawiki.org) looks like it expects HTML to be
returned, and it looks like you're returning wikitext, which ought to
cause problems. It should only cause problems with the displayed text,
though, the non-displayed text shouldn't be there at all, even as
blank space.