I've rewritten my managesieve patch using plugin api and I've found a few
issues:
1. Templates from plugin directory. I've commited patch from Roland Liebl
and it's possible now, but... images path is hardcoded to
"plugins/plugin_name/...",
and will not work if someone will change plugins_dir.
2. include_script() includes script after rcmail variable initialization.
That's ok, but there's a one situation when it's a problem.
For 'html' output I must write:
$this->rc->output->add_script(sprintf("rcmail.managesieve_updatelist('%s',
'%s', %d);",
isset($new) ? 'add' : 'update', $this->form['name'], $fid),
'foot');
instead of more unified form:
$this->rc->output->command('managesieve_updatelist', isset($new) ? 'add' :
'update', $this->form['name'], $fid);
3. Localization folder name should be constant for all plugins (hardcoded in
api).
Creating plugins translator will be simpler then.
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/