
|
[dokuwiki]
||
[Date Prev]
[04-2008 Date Index]
[Date Next]
||
[Thread Prev]
[04-2008 Thread Index]
[Thread Next]
[dokuwiki] HTML FORM OUTPUT/INJECTION
- From: Myron Turner <turnermm02@xxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 05 Apr 2008 09:17:58 -0500
I am testing a plugin using the recent rc, which replaces
HTML_EDITFORM_INJECTION with HTML_EDITFORM_OUTPUT. Under the old system
it was an easy matter to insert a form element inside the DokuWiki
Save/Edit form. With HTML_EDITFORM_OUTPUT, the same element that in the
old system appeared inside the form now appears either above or below
the form, depending on whether the trigger advisory is BEFORE or
AFTER. There seems to be no straight-forward way to accomplish this
task. There are to other devonly events listed on the events list page
that seem promising, HTML_DRAFTFORM_OUTPUT and
HTML_CONFLICTFORM_OUTPUT. But grep-ing the inc directory suggests that
these haven't been implemented in the current release.
I've looked at inc/form.php, as suggested on the DW events list page.
This gives a rudimentary description of how to create a new Form object
but doesn't indicate how to modify an existing form object. While PHP
doesn't have its own array insert function, inserts can be done, so it
would be possible to insert a new form element into the _content array
of the form object . But that doesn't seem to be a nice clean solution
to the problem, at least on the developer' side.
Also, for developers who have created their own forms in their plugins,
the new security token check will break these plugins. As far as I can
determine, it's necessary only to insert the following into the form:
if(function_exists('formSecurityToken')) {
formSecurityToken();
}
It doesn't appear to be necessary for the plugin itself to check for the
token. Is that correct?
Myron Turner
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
|

|