Roundcube with plugins support!!! WOW! Writing a plugin - display custom template has bogus docs.

Today I've noticed Roundcube has released a new version that finally has plugins support!
Grrrreaaat!

As expected in there is a change password plugin (with drivers supports) and some other that are pretty cool!
A list of plugins here: http://trac.roundcube.net/wiki/Plugin_Repository

Of course I've had some custom patching for my hosting users and now it's not working.
I've configured my change password plugin (which was the main showstopper for not upgrating to new roundcube) and the the little tiny hack for domain notification left.
I've decided to write a plugin that will do the job for me, so I can easily upgade after that.

Writing plugin isn't that hard at all. Here you can read more:
http://trac.roundcube.net/wiki/Doc_Plugins

also you can read plugins directory for more.

While creating my plugin I hit a problem and I've lost about 40 minutes searching for description and resolution.
The Resolutions was 5mins reading the class for temapltes but I thought I was wrong - no this is a mis-explanation in docs.
When you want to create a custom template you mkdir skins/default/templates and create/copy-modify html in it (I've copied login.html template).
Well all was fine while I've tried to show it.
Documentation is wrong.
When you call:

$rcmail->output->send('mytemplate');

you must actually call:

$rcmail->output->send('myplugin.mytemplate');
so the tpl class can understand this is a plugin and show your template and not search for default tpl.

Hope that helps someone.
Going to change/report this in docs now.
Oh. Symptoms are:

[12.Nov.2009 17:57:27 +0200]: PHP Error: Error loading template for logininfo in /var/www/roundcube/program/include/rcube_template.php on line 372 (GET /)

in your error log.

Trackbacks

Trackback specific URI for this entry

This link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA