[dokuwiki] Re: New Release of plugins and new helper plugin type

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 15 Dec 2006 02:31:37 +0000

Esther Brunner wrote:

Ok, I'll submit a darcs patch. And shall I add "renderer" as well?

If that is the other new plugin type, yes.


Hm no, it's not intended. Is it desirable then? Loading disabled
helper plugins could make sense, but also lead to confusion. I will
update my plugins to check plugin_isdisabled().

It might be better to create a method in the base class to load the helper. That will keep plugin code to a single line and all the associated logic in the one place (or rather two places as syntax plugins will need their own copy).

By the way: Do you think getMethods() is useful to generate a
semi-automatic reference for methods of helper plugins other plugins
can use? Or would it be better to add more extensive PHPdoc style
comments, because plugin authors need to look at the code anyway?

For it to be useful there needs to be some way of accessing the information. Do you have a mechanism in mind? Personally, I'd go with the PHPdoc style comments - the rest of dokuwiki is that way, most admins won't care about the plugin internals and the people who do care can read php. All of which would save time on providing a internal method

That makes sense. In some way we already have version information
inside php plugin files (date), but this may be tricky if multiple
components have different dates. The modification date of plugin files
might also not be a reliable indicator. What do you think of an empty
yyyy-mm-dd.version or 1.2.3.version file?
I was thinking the same method dw uses. An (optional) file called "VERSION" with a date inside.

Cheers,

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

Other related posts: