[Mediawiki-l] Hook request for EditPage.php

Lisa Ridley lhridley at theridleys.org
Sat Mar 3 13:39:42 UTC 2007


I'd like to request a hook addition for EditPage.php.

I'm working on some extensions to modify the user interface for the edit 
page in MediaWiki (specifically, to present the user with data form 
fields in addition to the standard Mediawiki free-form edit box.  The 
information captured in the data fields will be saved in the article 
created in a template format and displayed using a template specific for 
the data).  EditPage.php has a hook at the very beginning of the source 
code; however, I'd like to leverage the existing code as much as 
possible without having to use an "include" statement or recreate the 
code in my extension.  I'm currently modifying EditPage.php to place a 
hook at the end of the EditPage::edit() function, right above this line:

       $this->showEditForm();

That is similar in function to the one at the beginning of the function:

       if ( ! wfRunHooks( 'AlternateEdit', array( &$this  ) ) )
           return;

but calling it 'AlternateEditForm' instead.   It functions in a similar 
manner.  This allows me to leverage the existing code in EditPage:edit().

Ideally, I'd like to place this even further down, but I haven't found a 
better place for it yet.

If this could be formally added to the MediaWiki source code without 
requiring users to modify it, that would be wonderful!

Thanks for your consideration .

Lisa Ridley




More information about the MediaWiki-l mailing list