git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5534
7612ce4b-ef26-0410-bec9-
ea0150e637f0
$default_use_priority,
$message_highlight_list,
$index_order,
$default_use_priority,
$message_highlight_list,
$index_order,
- $indent_array, /* indent subject by */
- $pos, /* Search postion (if any) */
+ $indent_array, /* indent subject by */
+ $pos, /* Search postion (if any) */
$thread_sort_messages, /* thread sorting on/off */
$thread_sort_messages, /* thread sorting on/off */
- $server_sort_order, /* sort value when using server-sorting */
+ $server_sort_order, /* sort value when using server-sorting */
- $allow_server_sort; /* enable/disable server-side sorting */
+ $allow_server_sort, /* enable/disable server-side sorting */
+ $truncate_sender; /* number of characters for From/To field (<= 0 for unchanged) */
+
$color_string = $color[4];
if ($GLOBALS['alt_index_colors']) {
$color_string = $color[4];
if ($GLOBALS['alt_index_colors']) {
}
}
$senderName = str_replace(' ',' ',$senderName);
}
}
$senderName = str_replace(' ',' ',$senderName);
+
+ if ( $truncate_sender > 0 && strlen($senderName) > $truncate_sender ) {
+ $senderName = substr_replace($senderName, '... ', $truncate_sender);
+ }
+
echo html_tag( 'tr','','','','VALIGN="top"') . "\n";
if (isset($msg['FLAG_FLAGGED']) && ($msg['FLAG_FLAGGED'] == true)) {
echo html_tag( 'tr','','','','VALIGN="top"') . "\n";
if (isset($msg['FLAG_FLAGGED']) && ($msg['FLAG_FLAGGED'] == true)) {
on time distance from date of message */
$show_full_date = getPref($data_dir, $username, 'show_full_date', 0);
on time distance from date of message */
$show_full_date = getPref($data_dir, $username, 'show_full_date', 0);
+/* Allow user to customize length of from field */
+$truncate_sender = getPref($data_dir, $username, 'truncate_sender', 0);
+
do_hook('loading_prefs');
?>
do_hook('loading_prefs');
?>
'refresh' => SMOPT_REFRESH_NONE
);
'refresh' => SMOPT_REFRESH_NONE
);
+ $optvals[SMOPT_GRP_MAILBOX][] = array(
+ 'name' => 'truncate_sender',
+ 'caption' => _("Length of From/To Field (0 for full)"),
+ 'type' => SMOPT_TYPE_INTEGER,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'size' => SMOPT_SIZE_TINY
+ );
+
+
/*** Load the General Options into the array ***/
$optgrps[SMOPT_GRP_MESSAGE] = _("Message Display and Composition");
$optvals[SMOPT_GRP_MESSAGE] = array();
/*** Load the General Options into the array ***/
$optgrps[SMOPT_GRP_MESSAGE] = _("Message Display and Composition");
$optvals[SMOPT_GRP_MESSAGE] = array();