Changes between Version 10 and Version 11 of Plugin_API
- Timestamp:
- Feb 19, 2009 2:10:41 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Plugin_API
v10 v11 21 21 We created a branch [source:branches/devel-api] for the implementation of the Plugin API. 22 22 23 This only implements a basic backend plugin architecture with a few hooks. The way plugins may add UI elements and how they can register their steps and templates is not yet defined.23 This implements a basic backend plugin architecture with a few hooks. The way plugins may register hooks, add UI elements and how they can register their steps and templates is described on the [wiki:Doc_Plugins Plugin Documentation] page. 24 24 A draft about what we propose for the client part is to be found [wiki:Plugin_API_Draft here]. This requires some basic changes in the client-server communication before plugins can be developed. 25 25 … … 42 42 The !RoundCube app instantiates the class {{{rcube_plugin_api}}} which then loads all plugins from the plugin folder. A plugin folder is required to contain a PHP file named the same as the folder itself which contains a class with again the same name. This class extends {{{rcube_plugin}}} which provides a common interface for the plugin API. The plugin object then registers callback functions to certain hooks. The callback function receives a hash array as single argument containing all the hook-specific information. If the callback function wants to change some of the received data it has to return the complete argument array containing the altered properties. 43 43 44 See [source:branches/devel-api/plugins/ sample] for a sample implementation or read the [http://lists.roundcube.net/mail-archive/dev/2008-08/0000008.html latest discussion] about it.44 See [source:branches/devel-api/plugins/emoticons] for a sample implementation or read the [http://lists.roundcube.net/mail-archive/dev/2008-08/0000008.html latest discussion] about it. 45 45 46 46 === Currently implemented hooks === 47 47 48 || '''Name''' || '''Description''' || '''Arguments passed''' || '''Possible return values''' || 49 || {{{startup}}} || When application is initialized || task, action || task, action || 50 || {{{authenticate}}} || Before the IMAP login is executed || host, user || host, user, pass || 51 || {{{message-body-before}}} || Before message content cleanup/formatting || type,body,safe,plain,inline_html || type,body,safe,plain,inline_html || 52 || {{{message-body-after}}} || After message content formatting || type,body,safe,plain,inline_html || body || 53 48 See [wiki:Plugin_Hooks] for a continuously updated list of all implemented hooks. 54 49 55 50 == Proposed Plugins == … … 67 62 * move to a folder 68 63 * forward to another address (inline or as an attachment with headers intact) 69 * Import attached VC Sfiles64 * Import attached VCF files 70 65 * Alert on new Email (Messagebox / Sound?) 71 66 * Send emails via other SMTP servers[[BR]]
