Hi my problem is that i cant load some javascript file @ my special page extension. I tried it with addscript and some other methods but the only thing what happened was th
I added it in the skin file, in the function function setupSkinUserCss $out->addHeadItem('maketree.js',"
<script type='text/javascript' src='/js/mktree.js'></script>");
addScript works in version 1.16 and before. In 1.17 and later you should use addHeadItem:
$wgHooks['ParserBeforeTidy'][] = 'wgAddJquery';
function wgAddJquery(&$parser, &$text) {
global $addJqueryScripts;
if ($addJqueryScripts === true) return true;
$parser->mOutput->addHeadItem(
'<script language="JavaScript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>'
);
$addJqueryScripts = true;
return true;
}