I hope I could provide a small patch on monday for testing.
I made it. The Patch is made with SVN Version 1626. I implemented it slightly different. I'll describe it here:
Changes:
1 Config: optional you can set a plugin directory, default is as follows: $rcmail_config['plugin_dir'] = 'plugins/';
2 At the points where different plugin-actions should raise: rcube_plugins::get_instance()->actionUserLoggedIn(); Currently only this action is defined - other follow if the code is proved. As not really needed to implement a own function for each plugin-action it gives us a good documentation.
3 As rcube_plugins is a singleton class it is initialized when first needed. Then: ... the constructor calls registerPlugins() which loops thru the plugin-directory and searches for plugin classes and initiates them: This defaults to ./plugins/Pluginname/Pluginname.php which includes 'class Pluginname'
4 on the call to actionUserLoggedIn() in 2. the rcube_plugins singleton tries to find a matching method actionUserLoggedIn() in any plugin class.
5 demoEventLogger is an very small example plugin which should write a log to the temp folder.
Why I implemented it this way:
You will find the patch-file and a complete 7zip file including the whole roundcubemail folder here: http://www.lagg.at/temp The patch file is also included in this mail.
As I am not the greatest php programmer it would be great if someone can review it.
Thanks, yours