[dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Chris Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Mon, 29 Jan 2007 02:00:12 +0000
Gunther Pilz wrote:
All right - I think I understood your proposals.
So i.e. I have to register a hook on the DOKUWIKI_STARTED event to check
everytime if there is one of my $_POST vars!?
Whether DW does the check on behalf of your plugin or your plugin does
the check itself - I doubt there is any significant difference in
resource usage - except maybe to all those wiki's that don't need any
check at all ;)
Personally, I would hook into the ACTION_ACT_PREPROCESS or
ACTION_ACT_UNKNOWN events.
I guess the sensible thing is to check for your $_POST var inside your
plugin's register() method.
I still would find it much more userfriendly if the presence of
'unknown' (not DW standard) $_POST vars will trigger an event. And at
least it would be not a bad ideas, if you could register a callback
function with your event which will be "autmatically" called after the
event (maybe by one or two additional hidden fields in the basic edit
form which hold the required informations for this).
The idea is for the event system to be as light weight as possible to
efficiency and to keep the core of DW as small as possible. It is of
course possible to have a plugin to do exactly what you have said.
Plugins can trigger their own events.
I mean if I register a hook on the HTML_EDITFORM_INJECTION it's somehow
clear, that I want to deal with some extra form values. So in my opinion
there should be an easy way to get the form input and not such a long
way round by using the DOKUWIKI_STARTED event all the time.
So, no, I don't think there is a need for further alternatives to
handle $_POST vars. :)
And I still do ;).
I mean it's getting somehow a kind of useless if you have events for
every little piece on the one hand, but no corresponding onces on the
other and always have to deal with the big global events like
DOKUWIKI_STARTED. (I hope it's understandable what I've tried to explain
- my English didn't become better - sorry).
I guess I don't see why it needs another special event. DokuWiki form
handling is all determined by the action - ie. $ACT. If you want to
handle an action, process $ACT. There are several events that enable that.
Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Gunther Pilz
- References:
- [dokuwiki] HTML_EDITFORM_INJECTION event
- From: Gunther
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Chris Smith
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Gunther Pilz
Other related posts:
- » [dokuwiki] HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- » [dokuwiki] Re: HTML_EDITFORM_INJECTION event
All right - I think I understood your proposals. So i.e. I have to register a hook on the DOKUWIKI_STARTED event to check everytime if there is one of my $_POST vars!?
I still would find it much more userfriendly if the presence of 'unknown' (not DW standard) $_POST vars will trigger an event. And at least it would be not a bad ideas, if you could register a callback function with your event which will be "autmatically" called after the event (maybe by one or two additional hidden fields in the basic edit form which hold the required informations for this).
I mean if I register a hook on the HTML_EDITFORM_INJECTION it's somehow clear, that I want to deal with some extra form values. So in my opinion there should be an easy way to get the form input and not such a long way round by using the DOKUWIKI_STARTED event all the time.
So, no, I don't think there is a need for further alternatives to handle $_POST vars. :)
And I still do ;). I mean it's getting somehow a kind of useless if you have events for every little piece on the one hand, but no corresponding onces on the other and always have to deal with the big global events like DOKUWIKI_STARTED. (I hope it's understandable what I've tried to explain - my English didn't become better - sorry).
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Gunther Pilz
- [dokuwiki] HTML_EDITFORM_INJECTION event
- From: Gunther
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Chris Smith
- [dokuwiki] Re: HTML_EDITFORM_INJECTION event
- From: Gunther Pilz