Thread:Project:Support desk/Extension not parsing Wiki tags such as

Hi,

I'm trying to write a mediawiki extension that will pull the content from an existing article and display it on the front page. I want to use this extension because I could then change the article title in the extension and perhaps add more php features later on. I'm running a wiki on MW version 1.20 with latest PHP and MySQL.

The code that I'm using CAN NOT Parse wiki tags such as noinclude tags. It works in outputting the HTML from a wiki article but is not parsing noinclude tags. Are there Parser functions or options that can parse these tags?

I did many online/google searches but couldn't find any info so I hope someone can help. I also looked at the Parser and ParserOptions.php files in my wiki installation but it's not well-documented.

And I'm using the code below:

$wgHooks['ParserFirstCallInit'][] = 'wfFeatured';

function wfFeatured( Parser $parser ) { $parser->setHook( 'featuredmain', 'wfGetFeaturedArticle' ); return true; }

function wfGetFeaturedArticle($input, array $args, Parser $parser) { $t = "Article 1"; $article = new Article( Title::newFromText($t) ); $output = $article->getContent; $parserObject = $parser->parse($output, $parser->mTitle, $parser->mOptions, false, false); return $parserObject->getText;

}

Thanks for your help!!