Changes between Version 10 and Version 11 of Plugin_API


Ignore:
Timestamp:
Feb 19, 2009 2:10:41 PM (4 years ago)
Author:
thomasb
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Plugin_API

    v10 v11  
    2121We created a branch [source:branches/devel-api] for the implementation of the Plugin API. 
    2222 
    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. 
     23This 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. 
    2424A 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. 
    2525 
     
    4242The !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. 
    4343 
    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. 
     44See [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. 
    4545 
    4646=== Currently implemented hooks === 
    4747 
    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  
     48See [wiki:Plugin_Hooks] for a continuously updated list of all implemented hooks.  
    5449 
    5550== Proposed Plugins == 
     
    6762      * move to a folder 
    6863      * forward to another address (inline or as an attachment with headers intact) 
    69  * Import attached VCS files 
     64 * Import attached VCF files 
    7065 * Alert on new Email (Messagebox / Sound?) 
    7166 * Send emails via other SMTP servers[[BR]]