Manual talk:Hooks/SpecialPageExecuteBeforePage

From mediawiki.org
Latest comment: 16 years ago by Mattvick

This hook is still broken. I will try to figure out why it is broken if I find time --DFRussia 21:42, 20 July 2007 (UTC)Reply

If it's broken, report a bug. robchurch | talk 01:05, 21 July 2007 (UTC)Reply
A bug has been reported herebugzilla:10719--Mattvick 10:54, 27 July 2007 (UTC)Reply

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

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)Reply

$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 ;
}