I'm trying to wrap my head around how the hook for list_prefs_sections works. I don't think my brain is up to the task today, so I was wondering if anyone has a small example to show?
I'm assuming: ... $this->add_hook('list_prefs_sections', array($this, 'opt_block')); ...
function opt_block($args) { $args['cols'] = 'optlabel'; $args['list']['optlabel'] = array( 'id' => 'optlabel', 'section' => 'Option Label'); return $args; }
Digging through the program/steps/settings/func.inc I can see that list is a copy of $SECTIONS and I have no idea what cols is used for.
Anyone have a quickie example? _______________________________________________ List info: http://lists.roundcube.net/dev/
On Fri, 07 Aug 2009 15:44:15 -0230, Robert King robk@mun.ca wrote:
I'm trying to wrap my head around how the hook for list_prefs_sections works. I don't think my brain is up to the task today, so I was wondering if anyone has a small example to show?
If you just want to add an item to the list, do:
function opt_block($args) { $args['list']['optlabel'] = array( 'id' => 'optlabel', 'section' => 'Option Label'); return $args; }