Hello devs and list lurkers
Today we merged the development branch for the upcoming API back into the trunk. Now you can try out the Plugin API with a fresh checkout from the svn trunk. It is also available as nightly snapshot at http://nightly.roundcube.net/trunk/
It's now time for excessive testing to detect bugs that came in with the code changes for the API. Also the client scripts now rely on jQuery and we therefore changed a lot of javascript code. So please let us know if you find some strange behavior or broken buttons.
Regards, Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
Hi,
I have come across a couple of little things when porting my patches to plugins, I assumed that these bits just hadn't been done yet in the development. I'm sure you have your own plans but here is what I have found so far….
rcube_plugin->add_texts() always adds texts to the output even in AJAX mode, $OUTPUT->add_label() does not. Adding the texts when the page is loaded to service an AJAX request causes JS errors and an alert box with "error: undefined" pops up.
$OUTPUT->button() always tries to load text from the core localization
array. Is there a better alternative for use in plugins? For example if you
want a button and you give it a label like 'label' => $this->gettext('myplugin')
then on the button you get [My Plugin]
– the
correct text but with [] around it, as it cant be found in the core
localization array.
I think the new API is great apart from those two minor snags. It was really easy to move all my code across. The example plugins really help show what's what as well.
Finally a couple of hook requests:
working on a context menu for the message list and it works great the first time the page is loaded but I can’t see a way in the API to attach the event listener when switching between folders or when a new message arrives.
address book.
Apologies if you are already planning these. I know the code has just been merged to trunk and is still being developed.
Thanks
Phil http://www.tehinterweb.co.uk/roundcube/
On Mon, 20 Apr 2009 00:52:54 +0200, Thomas Bruederli roundcube@gmail.com wrote:
Hello devs and list lurkers
Today we merged the development branch for the upcoming API back into the
trunk. Now you can try out the Plugin API with a fresh checkout from the svn trunk. It is also available as nightly snapshot at http://nightly.roundcube.net/trunk/
It's now time for excessive testing to detect bugs that came in with the code changes for the API. Also the client scripts now rely on jQuery and
we
therefore changed a lot of javascript code. So please let us know if you find some strange behavior or broken buttons.
Regards, Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Phil Weir wrote:
Hi,
Hi Phil
Many thanks for your feedback.
I have come across a couple of little things when porting my patches to plugins, I assumed that these bits just hadn't been done yet in the development. I'm sure you have your own plans but here is what I have found so far….
rcube_plugin->add_texts() always adds texts to the output even in AJAX mode, $OUTPUT->add_label() does not. Adding the texts when the page is loaded to service an AJAX request causes JS errors and an alert box with "error: undefined" pops up.
This was due a bug in rcube_json_output.class. Should now be fixed and working.
$OUTPUT->button() always tries to load text from the core localization array. Is there a better alternative for use in plugins? For example if you want a button and you give it a label like
'label' => $this->gettext('myplugin')
then on the button you get[My Plugin]
– the correct text but with [] around it, as it cant be found in the core localization array.
You can now add the label 'domain' => $this->ID when calling $OUTPUT->button() from within a plugin class.
I think the new API is great apart from those two minor snags. It was really easy to move all my code across. The example plugins really help show what's what as well.
Thanks a lot. I'm looking forward to see your patches all turned into plugins. These will make a lot of RoundCube users happy.
Finally a couple of hook requests:
- A hook for when the message list is loaded or updated – I have been
working on a context menu for the message list and it works great the first time the page is loaded but I can’t see a way in the API to attach the event listener when switching between folders or when a new message arrives.
I've created two new events which could be helpful for you. listupdate: After the message list was updated (ajax response) insertrow: Triggers for each row after it was inserted.
- Address book hooks, when something is added/updated/deleted from the
address book.
OK, I'll work on these soon. Just keep an eye on http://trac.roundcube.net/wiki/Plugin_Hooks
Best regards, Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/