Roundcube Community Forum

 

How to add a "global" hook ?

Started by Dodfr, November 26, 2010, 03:35:20 AM

Previous topic - Next topic

Dodfr

I already wrote some plugins that hook some "tasks" but now I need to make a global hook.

My goal is to hide some specific folder names from any folder's list (main view, subscription, archive...).

I suppose I have to hook "render_mailboxlist", parse the folder's list, remove the ones I want to hide and return the new list, but I don't know how to initialize this "global" hook.

I tried the standard function init() and add_hook to render_mailboxlist but roundcube never go inside it.

regards.

rosali

Regards,
Rosali