Last modified: 2008-03-21 23:29:07 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. thanks, /jsb
The patch adds a call to $wgOut->getOnloadHandler() and puts the result into the right variable.
Created attachment 3190 [details] Proposed patch
PHPTal skin support is now dead.