I use the hMailServer, which allows you to create public IMAP folders that have '# Public' as the parent folder. I plan to hide these folders in the settings form.
I've already hidden them in the folders list, by editing the file 'RoundCube \ program \ steps \ settings \ folders.inc', but I can't hide them in the dropdown menu of the parent folder in the edit form.
The drop down menu is generated in the file 'RoundCube \ program \ steps \ settings \ edit_folder.inc', using the function 'rcmail_mailbox_select', but I don't know how to modify this list.
Thanks
Check out the following section in the main.inc.php:
// If IMAP server doesn't support NAMESPACE extension, but you're
// using shared folders or personal root folder is non-empty, you'll need to
// set these options. All can be strings or arrays of strings.
// Folders need to be ended with directory separator, e.g. "INBOX."
// (special directory "~" is an exception to this rule)
// These can be used also to overwrite server's namespaces
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other'] = null;
$rcmail_config['imap_ns_shared'] = null;
Quote from: SKaero on May 17, 2013, 12:16:00 PM
Check out the following section in the main.inc.php:
// If IMAP server doesn't support NAMESPACE extension, but you're
// using shared folders or personal root folder is non-empty, you'll need to
// set these options. All can be strings or arrays of strings.
// Folders need to be ended with directory separator, e.g. "INBOX."
// (special directory "~" is an exception to this rule)
// These can be used also to overwrite server's namespaces
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other'] = null;
$rcmail_config['imap_ns_shared'] = null;
I've tried to change the imap_ns_shared value, but nothing happened.
I've tried (the delimiter is '.'):
'#Public'
'#Public.'
array('#Public','#Public.Folder1')
No one works.
I've found the solution.
In edit_folder.inc file, row 124, I've insered before:
$select = rcmail_mailbox_select(array(
'name' => '_parent',
'noselection' => '---',
'realnames' => false,
'maxlength' => 150,
'unsubscribed' => true,
'skip_noinferiors' => true,
'exceptions' => $exceptions,
));
The following instruction:
array_push($exceptions,'#Public');
All the public folders are not inserted in combobox menu in parent folder selection, now.
I have created a plugin to protect hMailserver's #Public folder (hmail_publicfolder):
http://myroundcube.com/myroundcube-plugins
NOTE: As most MyRoundcube plugins this plugin is commercial.