Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: Dodfr on November 26, 2010, 03:35:20 AM

Title: How to add a "global" hook ?
Post by: Dodfr on November 26, 2010, 03:35:20 AM
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.
Title: How to add a "global" hook ?
Post by: rosali on November 29, 2010, 01:32:52 AM
I suggest to use startup hook.