On 2/14/07, Mark Clements gmane@kennel17.co.uk wrote:
"Jim Wilson" wilson.jim.r@gmail.com wrote in message news:ac08e8d0702140532sdd74668u487a6aeab0eaa35e@mail.gmail.com...
Dear Wiki Devs,
I have a proposal for adding new hooks into the MW codebase, and I'm
looking
for feedback (positive and negative). The goal of the proposed changes is to give Extension Devs the ability to cleanly hijack just about any class
in
the system. Here are the details:
[SNIP]
class UploadForm {
// ...
function instantiate( &$request ) { $uploadForm = new UploadForm($request); wfRunHooks('UploadFormInstantiate', array( &$uploadForm, &$request )); return $uploadForm; }
[SNIP]
What do you think? I'm genuinely interested in hearing what everyone has
to
say. Thanks!
No real comment on the idea at the moment, except that it might be better to use "Instantiate_ClassName" as the hook, so that they can be easily grouped in documentation, or referred to as "Instantiate_*" hooks. It also clearer what the hook does if you come across one you haven't seen before, I think.
- Mark Clements (HappyDog)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hello Jim,
I would definitely vote for this idea. It could potentially be a solution to many questions that people are posting, such as how to turn a wiki into a content management system. It would definitely make upgrading easier with wikis that have heavily hacked core code.