[dokuwiki] Re: Two action plugin hook suggestions

Andreas Gohr wrote:

I just pushed a small change to add this event. I'm not sure if I did it in the best possible way. It's now called HTML_EDIT_PAGETEMPLATE and is triggered in html_edit() unfortunately html_edit is an ugly piece of code and should probably be refactored, though I'd like to save that for the next release.

If you think this could be done better, feel free to send an correcting
patch.

I think its fine, excepting the event name doesn't really match the current format. The second part of the event name normally refers to the event data, in this case ID or PAGE and the last portion is normally a verb - at least when the event wraps around an action. Something like:

HTML_PAGE_CREATEFROMTEMPLATE

or maybe

HTML_PAGE_USETEMPLATE

Personally, I struggle to come up with names most of the time - I am not particularly happy with PARSER_CACHE_USE, as its not really "use" but "use?", so perhaps "isvalid" would be better. Ben seems to do ok at names, so it may be worth asking him :)

Ben?....

:-)

Cheers,

Chris


-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: