Page MenuHomePhabricator

headscripts variable not hooked up to MonoBook skin
Closed, ResolvedPublic


The headscripts variable that Tim Starling added ( ) is a
very useful addition for a plugin I'm working on. However, it doesn't appear to
be hooked up in MonoBook (other skins seem to inherit from SkinTemplate.php just
fine). This one line patch fixes that.

Patch forthcoming. In essense, just adding <?php $this->html('headscripts') ?>
to MonoBook.php will do the trick.

Hopefully for 1.5 release.

Version: 1.6.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:51 PM
bzimport set Reference to bz3603.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 937
Add "headscripts" variable to monobook


gregory.szorc wrote:

Could this please get put into the release branch of MediaWiki? For developers
that need to include Javascript as part of extensions and special pages, it is
frustrating to release products that force users to modify the MediaWiki code
base. The whole idea of the 'headscripts' variable is to allow developers to
just use $wgOut->addScript($foo) without having to get into the nitty-gritty of
editing skin files. The very presence of the headscript variable and related
functions proves that this should be enabled in the skins. It's absence is
obviously just an oversight.

robchur wrote:

Fixed in CVS HEAD. Will check about backporting to 1.5 branch.

river wrote:

are you planning to back port this in the short term? i need it for a 1.5
extension i'm writing - if you're too busy i'll do it myself.

robchur wrote:

Not until I can be bothered to check, so probably quicker to do it yourself. ;-)