I am currently working on an extension for MediaWiki and am having some
trouble getting scripts into the <head>
it seems as though $wgOut->addScript() does not work in the following case:
$wgExtensionFunctions[] = 'liveLocal_Install';
function liveLocal_Install()
{
global $wgParser, $wgHooks;
$wgParser->setHook("llmap", 'liveLocal_Render');
}
function liveLocal_Render($source, $argv)
{
global $wgParser, $wgTitle, $wgOut, $wgliveLocalDefaults, $wgJsMimeType,
$wgliveLocalOnThisPage;
....
$wgOut->addScript( "<script src=\"
http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js\<http://dev.virt…
type=\"{$wgJsMimeType}\"></script>\n" );
...
}
I am unsure if it is because the timing of when I call addScript or what.
Any help would be greatly appreciated.
-Richard Minerich