</configsection>
</configtab>
- <configtab name="mimp" desc="Mobile View (mimp) Options">
- <configsection name="mimp">
- <configsection name="mailbox">
- <configheader>Mailbox Settings</configheader>
- <configinteger name="max_from_chars" desc="In the mailbox view, how many
- characters of From: addresses should we show before truncating
- them?">10</configinteger>
- <configinteger name="max_subj_chars" desc="In the mailbox view, how many
- characters of Subject: lines should we show before truncating
- them?">20</configinteger>
- </configsection>
- </configsection>
- </configtab>
-
<configtab name="dimp" desc="Dynamic View (dimp) Options">
<configsection name="dimp">
<configlist name="css_files" required="false" desc="A list of additional CSS
'desc' => _("Display only the first 250 characters of a message initially?")
);
+$_prefs['mimp_max_from_chars'] = array(
+ 'value' => 10,
+ 'locked' => true,
+ 'shared' => false,
+ 'type' => 'number',
+ 'desc' => _("In the mailbox view, how many characters of From: addresses should we show before truncating?")
+);
+
+$_prefs['mimp_max_subj_chars'] = array(
+ 'value' => 20,
+ 'locked' => true,
+ 'shared' => false,
+ 'type' => 'number',
+ 'desc' => _("In the mailbox view, how many characters of Subject: lines should we show before truncating?")
+);
+
// End Minimalist View Options
// Standard View Options
The 'show_preview' option has been removed; enabling previews is now handled
by the 'show_preview' preference.
+The 'max_from_chars' and 'max_subj_chars' configuration options for the
+minimal (mimp) display have been moved to preferences ('mimp_max_from_chars'
+and 'mimp_max_subj_chars').
+
Preferences
-----------
/* Format the from header. */
$getfrom = $imp_ui->getFrom($ob['envelope']);
$msg['from'] = $getfrom['from'];
- if (Horde_String::length($msg['from']) > $conf['mimp']['mailbox']['max_from_chars']) {
- $msg['from'] = Horde_String::substr($msg['from'], 0, $conf['mimp']['mailbox']['max_from_chars']) . '...';
+ if (Horde_String::length($msg['from']) > $prefs->getValue('mimp_max_from_chars')) {
+ $msg['from'] = Horde_String::substr($msg['from'], 0, $prefs->getValue('mimp_max_from_chars')) . '...';
}
/* Get flag information. */
$msg['subject'] = $threadtree[$ob['uid']] . trim($msg['subject']);
}
- if (Horde_String::length($msg['subject']) > $conf['mimp']['mailbox']['max_subj_chars']) {
- $msg['subject'] = Horde_String::substr($msg['subject'], 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
+ if (Horde_String::length($msg['subject']) > $prefs->getValue('mimp_max_subj_chars')) {
+ $msg['subject'] = Horde_String::substr($msg['subject'], 0, $prefs->getValue('mimp_max_subj_chars')) . '...';
}
/* Generate the target link. */