}
$link .= '</a>';
+ $hooklink = do_hook_function('create_collapse_link',$link);
+ if ($hooklink != '')
+ $link = $hooklink;
+
/* Return the finished product. */
return ($link);
}
$collapse = false;
$unseen_type = 1;
$unseen_notify = 0;
+ $unseen = 0;
/* Get unseen/total display prefs */
$unseen_type = getPref( $data_dir , $username , 'unseen_type' );
$leader = '<tt>';
$leader .= str_repeat(' ',$j);
$mailboxURL = urlencode($mailbox);
+
/* get unseen/total messages information */
- if ($boxes->unseen !== false || $boxes->total !== false) {
- $unseen = $boxes->unseen;
- if ($unseen>0 && $boxes->total>0) {
- $unseen_string = "($unseen)";
- $unseen_found = TRUE;
- }
- $unseen_before = '<font color="' . $color[11] . '">';
- $unseen_after = '</font>';
- if ((($unseen_notify == 2) && (strtolower($mailbox) == 'inbox')) || ($unseen_notify == 3)) {
- $unseen_string = '(' . $unseen;
+ /* Only need to display info when option is set */
+ if (isset($unseen_notify) && ($unseen_notify > 1)) {
+
+ if ($boxes->unseen !== false) {
+ $unseen = $boxes->unseen;
+ } else {
+ $unseen = 0;
+ }
- if ($unseen_type > 1) {
- $unseen_string .= '/' . $boxes->total;
+ /*
+ Should only display unseen info if the folder is inbox
+ or you set the option for all folders
+ */
+
+ if ((strtolower($mailbox) == 'inbox') || ($unseen_notify == 3)) {
+ $unseen_string = $unseen;
+
+
+ /* If users requests, display message count too */
+ if (isset($unseen_type) && ($unseen_type == 2)) {
+ $numMessages = $boxes->total;
+ $unseen_string .= '/' . $numMessages;
+ }
+
+ $unseen_string = "<font color=\"$color[11]\">($unseen_string)</font>";
+
+ /*
+ Finally allow the script to display the values by setting a boolean.
+ This can only occur if the unseen count is great than 0 (if you have
+ unseen count only), or you have the message count too.
+ */
+ if (($unseen > 0) || (isset($unseen_type) && ($unseen_type ==2))) {
+ $unseen_found = true;
}
- $unseen_string .= ')';
- $unseen_string = $unseen_before . $unseen_string . $unseen_after;
- }
- } else {
- $unseen = 0;
+
+ }
+
}
if (isset($boxes->mbxs[0]) && $collapse_folders) {
$pre = '';
$end = '';
$collapse = false;
+ $unseen_found = false;
+ $unseen = 0;
if ($boxes) {
$mailbox = $boxes->mailboxname_full;
$mailboxURL = urlencode($mailbox);
- /* get unseen/total messages information */
- if ($boxes->unseen !== false) {
- $unseen = $boxes->unseen;
- if ($unseen>0) {
- $unseen_found = TRUE;
- $unseen_string = "($unseen)";
- }
- if ($boxes->total) {
- $numMessages = $boxes->total;
- $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
+ /* Only need to display info when option is set */
+ if (isset($unseen_notify) && ($unseen_notify > 1)) {
+
+ if ($boxes->unseen !== false) {
+ $unseen = $boxes->unseen;
+ } else {
+ $unseen = 0;
}
- } else $unseen = 0;
+
+ /*
+ Should only display unseen info if the folder is inbox
+ or you set the option for all folders
+ */
+
+ if ((strtolower($mailbox) == 'inbox') || ($unseen_notify == 3)) {
+ $unseen_string = $unseen;
+
+
+ /* If users requests, display message count too */
+ if (isset($unseen_type) && ($unseen_type == 2)) {
+ $numMessages = $boxes->total;
+ $unseen_string .= '/' . $numMessages;
+ }
+
+ $unseen_string = "<font color=\"$color[11]\">($unseen_string)</font>";
+
+ /*
+ Finally allow the script to display the values by setting a boolean.
+ This can only occur if the unseen count is great than 0 (if you have
+ unseen count only), or you have the message count too.
+ */
+ if (($unseen > 0) || (isset($unseen_type) && ($unseen_type ==2))) {
+ $unseen_found = true;
+ }
+
+ }
+
+ }
/* If there are unseen message, bold the line. */
if ($unseen > 0) { $pre .= '<b>'; }
if (!$boxes->is_root) {
if ($use_folder_images) {
if ($boxes->is_inbox) {
- $folder_img = '../images/inbox.gif';
+ $folder_img = '../images/inbox.png';
} else if ($boxes->is_sent) {
- $folder_img = '../images/senti.gif';
+ $folder_img = '../images/senti.png';
} else if ($boxes->is_trash) {
- $folder_img = '../images/delitem.gif';
+ $folder_img = '../images/delitem.png';
} else if ($boxes->is_draft) {
- $folder_img = '../images/draft.gif';
- } else $folder_img = '../images/folder.gif';
+ $folder_img = '../images/draft.png';
+ } else $folder_img = '../images/folder.png';
$folder_img = ' <img src="'.$folder_img.'" height="15" valign="center" /> ';
} else $folder_img = '';
if (!isset($boxes->mbxs[0])) {
$collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED : $collapse);
}
if ($collapse) {
- $link = '<a href="javascript:void(0)">'." <img src=\"../images/plus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\" /></a>";
+ $link = '<a href="javascript:void(0)">'." <img src=\"../images/plus.png\" border=\"1\" id=$j onclick=\"hidechilds(this)\" /></a>";
} else {
- $link = '<a href="javascript:void(0)">'."<img src=\"../images/minus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\" /></a>";
+ $link = '<a href="javascript:void(0)">'."<img src=\"../images/minus.png\" border=\"1\" id=$j onclick=\"hidechilds(this)\" /></a>";
}
$collapse_link = $link;
} else $collapse_link='';
if(ele.style.display == "none") {
ele.style.display = "block";
ele.style.visibility = "visible"
- el.src="../images/minus.gif";
+ el.src="../images/minus.png";
document.all[form_id].value=0;
} else {
ele.style.display = "none";
ele.style.visibility = "hidden"
- el.src="../images/plus.gif";
+ el.src="../images/plus.png";
document.all[form_id].value=1;
}
}
if(ele.style.display == "none") {
ele.style.display = "block";
ele.style.visibility = "visible"
- el.src="../images/minus.gif";
+ el.src="../images/minus.png";
document.getElementById(form_id).value=0;
} else {
ele.style.display = "none";
ele.style.visibility = "hidden"
- el.src="../images/plus.gif";
+ el.src="../images/plus.png";
document.getElementById(form_id).value=1;
}
}