Last modified: 2010-05-15 15:37:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3039 - Unable to Include Custom Scripts from Skins
Unable to Include Custom Scripts from Skins
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-08-03 22:11 UTC by Gregory Szorc
Modified: 2010-05-15 15:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Gregory Szorc 2005-08-03 22:11:08 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.


$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.

Note You need to log in before you can comment on or make changes to this bug.