I think this was all pretty well said before in your "plugins that run once" question.
The question is not "should I move my template functions to a plugin," its "should we move dw's template functions to a plugin?"
These functions being the current dokuwiki template functions, you know, tpl_button, tpl_actionlink, and such-- for instance the two I mentioned there could be expanded to accept more link types. And there's some added potential to whatever additional functions that could be added...
Doing things this way neatly avoids having to use extensive function/class/method existence checks.
Action or admin, I don't have a real big issue on how the code is encapsulated. I think the original idea of just having one include (again referencing the plugin I mentioned earlier) would be an easy "drop-in" choice. Also, if this method becomes something **required** for templates then you just assume to not do any checks for functions and all you have extra is the one include.
The reason I even thought of admin, instead of say syntax, is that at least with admin you have a page which you could then use for a local tpl API reference. Sure, it has no admin functionality, but it's not as if that's going to cause any additional slowdown, right?
trigger_event('CUSTOM_TEMPLATE_EVENT',....);
Would making an event for each of the current "tpl_" template functions be a good idea though?
So again, should we move dw's template functions to a plugin? Thoughts?
-- --Terence J. Grant(tjgrant@xxxxxxxxxxxx) -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist