>> I can create a tab, no problem. Many of my plugins do that :) 
>> 
>> I can create a new section under general, no problem.
>> 
>> But I want pluggable sections under a new tab :)
> 
> Understood.
>> 
>> Anyways, what im doing now is i made a plugin that creates a new tab, and 
>> has a hook where plugins can register for a section. This works fine. Im 
>> seeing a set of plugins. But then I also have to make my own 
>> preferences_list and preferences_save unfortunately.  Unless there is some 
>> trick im missing on how i could re-use those settings functions. 
> 
> You could make your plugin hook into the 'preferences_sections_list' and
> 'preferences_list' hooks and re-arrange the items that have been added by
> the plugins you want to gather. Just make sure your plugin is loaded
> "after" the others that should make it receive the hook events at the end.

Could you elaborate? What do you mean by re-arrange? 

I can actually get this to work, if I let my 7 plugins hook into both the 
preferences_sections_list, and my own plugin section list. Then I see the 
plugins on my own tab, and I can click on them, and if my new tab plugin 
javascript calls the normal edit-prefs action with my own section it all seems 
to work and I see the edit screen in my iframe. 

Only issue now is, i see these 7 plugins on the general tab as well.  I could 
hide this with css maybe, but you seem to suggest I could do something else. I 
dont quite see what yet :) It seems the plugins have to be listed in 
preferences_section_list, else edit_prefs.inc doesnt actually find the plugin.

$CURR_SECTION = get_input_value('_section', RCUBE_INPUT_GPC);
list($SECTIONS,) = rcmail_user_prefs($CURR_SECTION);   <-- my plugin doesnt end 
up in this array if I dont hook my plugin into preferences_sections_list. 

Cor

_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev

Reply via email to