-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Barrett wrote:
Is there a good way to add a global variable to
Skins.php:
makeGlobalVariablesScript() without modifying core MediaWiki code?
This is MW 1.13.
There's a hook in there for 1.14, but it didn't make it in to 1.13 it
looks like.
In most cases it'll be quite sufficient to just add another <head>
script defining your variable. Something like this should do, if I'm not
mistaken:
$wgOut->addInlineScript("var wgMyVariable=" . Xml::encodeJsVar($var));
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkikr3gACgkQwRnhpk1wk47mVQCgx30YyPS2ng2VDa88VSUPAb6l
ZncAoLJDPRQOgdcsLhj1Rkd40+SPepHd
=Q27p
-----END PGP SIGNATURE-----