[dokuwiki] Re: Plugins

> -----Original Message-----
> From: dokuwiki-bounce@xxxxxxxxxxxxx
> [mailto:dokuwiki-bounce@xxxxxxxxxxxxx]On Behalf Of Chris Smith
> Sent: 08 August 2005 23:46
> To: dokuwiki@xxxxxxxxxxxxx
> Subject: [dokuwiki] Re: Plugins
>

>
> I'm open for any suggestions and code as always ;-)
>
> Andi

Hi,

I have sent a series of patches.

(1) admin plugin interface & the acl functions converted to a plugin

the admin plugin interface is pretty much as I detailed it at
http://wiki.jalakai.co.uk/dokuwiki/doku.php/admin_plugins.  I have added
some extra introspection functions, localisation handling and some useful
common functions (output wiki links, output email addresses, render wiki
markup) to both prevent unnecessary duplication and properly support $conf
options.

its a bit much to call the acl plugin a conversion.  Two functions needed
renamed and a few function calls changed to be $this->somefunction().

[I for one would like to see a config editor plugin :) ]

(2) non-intrusive changes to support plugin manager

these are:
- an additional option $conf['pluginmanager'] in conf/dokuwiki.php, set to
0, that unless set to 1 will disable the changes.

- plugin load to skip lib/plugins/tmp folder in its check for plugins (not
disabled by config option). Plugin manager uses this folder for downloading
and decompressing.

- change to plugin_printCSSJS() to only provide one of each file,
plugin_style.css, plugin_script.js, plugin_print.css, plugin_screen.css.
This reverts to current behaviour if the config option is not set.

(3) the plugin manager plugin, I'll need to write up documentation for it,
in essence it supports the following functions:

refresh : sweeps all plugin javascript and CSS files into four files as
mentioned above.  Performs any url adjustments required for the CSS files.

[this might not sound necessary, having an extra 10 or so CSS and JS links,
some only containing two lines seems a bit much]

download: if given a url will download, extract and copy into plugins folder
the new plugin

info (plugin) : report details of plugin, including source, first installed
and last updated
update (plugin) : revisit original source url and replace with an updated
version (not yet finished)
delete (plugin) : delete the plugin folder and its contents

after downloading, updating and deleting it automatically does a refresh.

there are some things still to do,
settings (plugin) : provide a simple interface to alter plugin settings.
might be dropped as perhaps this would be better handled by plugins
themselves providing their own admin plugin.
update (plugin) : keep proper track of files installed, dependencies etc.
refresh : provide an increasing number portion to file names, to ensure
browsers will retrieve the updated files.

known problems:
the zip library functions don't work on Esther's plugin files at least not
those made using the OS X standard compressor, its fine with stuffit.

if the plugin interface gets into the development version I can provide a
download for this plugin.  feedback is welcome :)


Cheers,

Chris

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

Other related posts: