Dear Developers!
 
I am using RC in my hosting offers and I want to implement two things:
* a kind of plugin-mechanism: It should be possible to "register" some external plugins to events (User login, handling contact data, ...)
* a Funambol-Plugin (as seperate open source project): Funambol is a server capable of syncing contacts/calendar items between native Clients (Outlook, Thunderbird), various Devices (many mobile phones, PDA's, ...) and other webmail-applications and groupwares.
 
I talked to A.L.E.C. some days ago because he had plans for the plugin infrastructure. According to his mails he has no time to develop this in the near future and I asked him if I can do the work. He answered it would be ok, so I'll ask you how it should be done:
 
So here are my questions:
* How should a plugin-architecture be implemented in RoundCube?
Maybe my approach is completely wrong, just tell me if you think so...
I'm thinking of a PluginHooks singleton class which is called from various points in the existing source code. This class reads a config file if there is a plugin registered for the specific event. This config contains a line for each event like this:
$rcmail_config['pluginevent_userlogin'] = array('Funambol');                            //registers a single plugin called "funambol" for the event "userlogin"
$rcmail_config['pluginevent_nextEvent'] = array('Funambol', 'AnotherPlugin);    //call two plugins in the given order
PluginHooks then initates a class Funambol (located in RC_Home/plugins/Funambol) and calls a method pluginevent_userlogin. Because PluginHooks is a singleton, it could provide methods to the plugins to get or manipulate data from the rest of RC. so anything is handled over this class.
I hope I discribed it well. Please bring your own ideas if you have better once.
 
* Is anyone interested in teaming up?
 
* Is anyone willing to implement plugins in near future? If so - please talk to me to discuss your requirements to make this project as useful as possible.
 
You can send me a CC so I can answer your mails quicker.
 
Thanks in advance,
Greetings
 
--
Florian Lagg
-
 Florian Lagg - IT-Komplettlösungen
 Juch 7, 6631 Lermoos
 tel +43 (699) 10 20 10 24
 www.lagg.at - info@lagg.at
-
 Xing: http://www.xing.com/go/invite/7372113.3da562
-