Last modified: 2010-05-15 15:37:20 UTC
Some extensions may wish to include custom scripts (like JavaScript) in the <head> of the page output. Currently, there is no way to do this without modifying the skin itself. However, the functionality is provided in OutputPage::addScript() and OutputPage::getScript() (as referenced by OutputPage::headElement() ). The $wgOut->mScripts variable just isn't available to the skin template. Solution: Add: $tpl->setRef('headscripts', $out->getScript() ); or similar to the appropriate location in SkinTemplate.php (around line 227). The skins then need to be modified to include this variable.