Manual:Hooks/SpecialPageExecuteBeforePage

There is a note in includes/SpecialPage.php where this hook is called stating that it is broken for extensions, see below:

if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
 * 1) FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage.

Will this hook be fixed? --Mattvick 15:27, 19 June 2007 (UTC)

I am attempting to modify the Special:Preferences page via an extension rather than directly within the core code. See my code below. If the hook is not due to be fixed will someone please offer another way to amend the Special:Preferences page without hacking the core code? --Mattvick 15:27, 19 June 2007 (UTC)

$wgHooks['SpecialPageExecuteBeforePage'][] = 'CustomUserPreferencesPage';

function CustomUserPreferencesPage($specialpage, $par, $func) {

// Check if this hook has been called from the correct page if ($specialpage->mName == 'Preferences') { global $IP ; $specialpage->file($IP . "/extensions/CustomUserPreferencesPage/templates/CustomSpecialPreferences.php") ; } return true ; }