php如何做left,left_main.php

左側主頁程式,preg_split 函式的 flag 為 PREG_SPLIT_NO_EMPTY,不是 PREG_SPLIT_NI_EMPTY,且不能用單引號括起來。

[root@mail squirrelmail-1.4.8]# diff -wuN ./src/left_main.php /var/www/squirrelmail/src/left_main.php

--- ./src/left_main.php2006-04-15 06:27:08.000000000 +0800

+++ /var/www/squirrelmail/src/left_main.php2013-05-23 16:39:03.000000000 +0800

讓其他目錄中有未讀郵件,也如收件匣一樣,可以顯示未讀郵件筆數提醒。

@@ -48,8 +48,8 @@

}

$unseen = 0;

$status = array('','');

- if (($unseen_notify == 2 && $real_box == 'INBOX') ||

- $unseen_notify == 3) {

+ if ($unseen_notify == 2 || $unseen_notify == 3) {

$tmp_status = create_unseen_string($real_box, $box_array, $imapConnection, $unseen_type );

if ($status !== false) {

$status = $tmp_status;

讓其他目錄中有未讀郵件,也如收件匣一樣,可以顯示未讀郵件筆數提醒,上述的做法是錯的。變數 $ubseen_notify 取得的預設值由設定 /etc/squirrelmail/config.php 取得,其定義可以由預設設定檔查到:1 代表都不顯示;2 代表只有 INBOX 目錄; 3 代表全部目錄都顯示,因此只要修改設定檔即可。

[root@mail ~]# grep default_unseen_notify -C3 /etc/squirrelmail/config_default.php

/**

* These next two options set the defaults for the way that the

* users see their folder list.

* $default_unseen_notify

* Specifies whether or not the users will see the number of

* unseen in each folder by default and also which folders to

* do this to. Valid values are: 1=none, 2=inbox, 3=all.

* $default_unseen_type

* Specifies the type of notification to give the users by

* default. Valid choice are: 1=(4), 2=(4,25).

* @global integer $default_unseen_notify

* @global integer $default_unseen_type

*/

$default_unseen_notify = 2;

$default_unseen_type = 1;

/**

修改 squirrelmail 設定檔 /etc/squirrelmail/config.php 的 $default_ubseen_notify = 3 即可讓所有目都顯示未讀郵件數量。

[root@mail ~]# vim /etc/squirrelmail/config.php

[root@mail ~]# grep default_unseen_notify /etc/squirrelmail/config.php

$default_unseen_notify = 3;

讓 Spam 目錄也有清空垃圾埇的功能。

@@ -92,7 +93,7 @@

}

/* If it's the trash folder, show a purge link when needed */

- if (($move_to_trash) && ($real_box == $trash_folder)) {

+ if (($move_to_trash) && (($real_box == $trash_folder) || ($real_box == 'Spam'))) {

if (! isset($numMessages)) {

$numMessages = sqimap_get_num_messages($imapConnection, $real_box);

}

@@ -100,7 +101,7 @@

if (($numMessages > 0) or ($box_array['parent'] == 1)) {

$urlMailbox = urlencode($real_box);

$line .= "\n\n" .

- '  ('._("Purge").')' .

+ '('._("Purge").')' . //dywang

'';

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值