Last modified: 2008-03-21 23:29:07 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 3172 - PHPTal templates don't support setOnloadHandler
PHPTal templates don't support setOnloadHandler
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
PC All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: javascript
  Show dependency treegraph
Reported: 2005-08-17 04:18 UTC by Jonah Bossewitch
Modified: 2008-03-21 23:29 UTC (History)
1 user (show)

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

Proposed patch (657 bytes, patch)
2007-02-06 11:47 UTC, Stefan Brüns

Description Jonah Bossewitch 2005-08-17 04:18:30 UTC
Skin.php sets the onload body attr based on the onLoadHandler calls:

$a['onload'] = $wgOut->getOnloadHandler();
		if( $wgUser->getOption( 'editsectiononrightclick' ) ) {
			if( $a['onload'] != '' ) {
				$a['onload'] .= ';';
			$a['onload'] .= 'setupRightClickEdit()';
		return $a;

But, when using PHPTal (some of us still prefer these skins), functions set
using setOnLoadHandler calls are ignored.

We need something like
$tpl->set( 'onload', $wgOut->getOnloadHandler(); 

and a corresponding tal:attribute="onload onload" in the .pt file.

Of course, changes like this would be far easier to incorporate if there were a
runHook that passed through the $tmp so arbitrary variables could be set which
were available from the templates.

In this particular case, unobstrusive javascript can be used to set onload
handlers, but this is inconsistent with the setOnloadHandler api.

Comment 1 Stefan Brüns 2007-02-06 11:46:38 UTC
The patch adds a call to $wgOut->getOnloadHandler() and puts the result into the right 
Comment 2 Stefan Brüns 2007-02-06 11:47:25 UTC
Created attachment 3190 [details]
Proposed patch
Comment 3 Brion Vibber 2008-03-21 23:29:07 UTC
PHPTal skin support is now dead.

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