-----Ursprüngliche Nachricht----- Von: Cor Bosman [mailto:cor@xs4all.nl] Gesendet: Donnerstag, 7. August 2008 23:30 An: Florian Lagg Betreff: Re: [RCD] Plugin-Architecture
Currently I have plans implementing it this way (OVERVIEW):
- There's a directory with plugins, e.g. ./plugins/*
- Each plugin resides in a own directory, let's call it
"foo_plugin"
for now. This assumes that there is a file called foo_plugin.inc
which includes
a class foo_plugin
- In the configuration, we have a simple array list of
enabled plugins
$rcmail_config['plugins_enabled'] = array('foo_plugin',
'bar_plugin');
- on the first called hook we initiate the rcube_plugins
class which
is a singleton this class initalizes every plugin and - in the constructor of these - the plugins itself register to some hooks. this is done only once every request (because rcube_plugins is a singleton)
- if registered hooks are called...
##### here's a small mistake:
every plugin is called - one after another - in the order
given in the
config above.
##### naturally we call only plugins registered to the specific hook - not all
therefore an array of data is passed to each plugin - and at last - returned to the roundcube code.
Have I missed someting?
Look good! Thanks for doing this.
Cor
List info: http://lists.roundcube.net/dev/
Hi,
I have attached a few of plugin/patch examples that I have been using to help show what needs to be allowed for. I think both sslling and previewnotread are actually patchs rather than plugins as they make changes in unusual places. I attached them really just to see if any one disagreed with that assesment. changepasswd is definatly a plugin.
From my experience the only files you HAVE to patch at get a plugin working
at the moment are app.js (maybe this will be easier once the JQuery rewrite is done, maybe the plugin API could be considered while this is being done), the language files - it would be nice if the plugin api allowed for language files inside the plugin dir that will be merged with the main labels/messages arrays, then the language files dont need to be patched. Finally settingstabs.html, which has come up allready in this discussion.
I think that the location of CSS/JS files needed by plugins has also already been mentioned, at the moment they have to be within the RC directory structure which isnt great for simple plugin installation.
Thanks very much for all your work
Phil
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/ne/gi3cZVmP/UTF-8_27_27changep.pat http://detached.gigo.com/rc/ne/gi3cZVmP/UTF-8_27_27ssllink.pat http://detached.gigo.com/rc/ne/gi3cZVmP/UTF-8_27_27preview.pat Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/