deurk said:
> [EMAIL PROTECTED] a dit :
>
>> I was wondering if anyone has succesfully set up messege flags and icons
>> on 1.4.0RC2 yet. I'd like to set it up but am wondering if there are any
>> differences between setting it up on 1.4 and 1.2.8.

> I contacted the author of that plugin to have him fix this for SM
> 1.4.0.RC2a but he is in exams right now. I hope he will think about fixing
> that soon, cause it gives SM a great look!

I got the msg_flags plugin working on my copy, it's pretty straight forward. 
Below are the patches for my changes.  If by "icons" you mean the picons
package, that's not as simple.  It requires a change to the way do_hook works
(see my patch on sourceforge), due to changes in the way the HTML is generated
in 1.4.

diff -c move_messages.php.orig move_messages.php
*** move_messages.php.orig      2003-01-26 22:10:36.000000000 -0800
--- move_messages.php   2003-01-26 22:13:22.000000000 -0800
***************
*** 166,171 ****
--- 166,177 ----
  if (isset($_POST['markUnread'])) {
      $markUnread = $_POST['markUnread'];
  }
+ if (isset($_POST['markFlagged'])) {
+     $markFlagged = $_POST['markFlagged'];
+ }
+ if (isset($_POST['markUnflagged'])) {
+     $markUnflagged = $_POST['markUnflagged'];
+ }
  if (isset($_POST['attache'])) {
      $attache = $_POST['attache'];
  }
***************
*** 246,251 ****
--- 252,261 ----
              sqimap_toggle_flag($imapConnection, $id, '\\Seen',true,true);
             } else if (isset($markUnread)) {
              sqimap_toggle_flag($imapConnection, $id, '\\Seen',false,true);
+            } else if (isset($markFlagged)) {
+             sqimap_toggle_flag($imapConnection, $id, '\\Flagged',true,true);
+            } else if (isset($markUnflagged)) {
+             sqimap_toggle_flag($imapConnection, $id, '\\Flagged',false,true);
             } else  {
              sqimap_msgs_list_delete($imapConnection, $mailbox, $id);
                if ($auto_expunge) {


diff -c left_main.php.orig left_main.php
*** left_main.php.orig  2003-01-26 22:13:42.000000000 -0800
--- left_main.php       2003-01-26 22:14:36.000000000 -0800
***************
*** 172,180 ****
      $link = '<a target="left" style="text-decoration:none" ' .
              'href="left_main.php?';
      if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED) {
!         $link .= "unfold=$mailbox\">+";
      } else {
!         $link .= "fold=$mailbox\">-";
      }
      $link .= '</a>';

--- 172,180 ----
      $link = '<a target="left" style="text-decoration:none" ' .
              'href="left_main.php?';
      if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED) {
!         $link .= "unfold=$mailbox\"><IMG SRC=\"../images/plus.gif\"
border=\"0\">";
      } else {
!         $link .= "fold=$mailbox\"><IMG SRC=\"../images/minus.gif\"
border=\"0\">";
      }
      $link .= '</a>';


diff mailbox_display.php.picons.msgflags mailbox_dis
<     global $checkall,
---
>     global $checkall, $msg,
202,203c202,203
<                 if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED'] ==
true) {
<                     $td_str .= _("A");
---
>                 if (isset($msg['FLAG_FLAGGED']) && $msg['FLAG_FLAGGED'] ==
true) {
>                     $td_str .= "<IMG
SRC=\"../plugins/msg_flags/flagged.gif\"
border=\"0\">\n";
205a206,211
> /*
>  *                if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED']
== true) {
>  *                    $td_str .= _("A");
>  *                    $stuff = true;
>  *                }
>  */
207c213,214
<                     $td_str .= '+';
---
> /*                    $td_str .= '+'; */
>                   $td_str .= "<IMG SRC=\"../plugins/msg_flags/attach.gif\"
border=\"0\">\n";
212c219,220
<                         $td_str .= "<font color=\"$color[1]\">!</font>";
---
> /*                        $td_str .= "<font color=\"$color[1]\">!</font>"; */
>                         $td_str .= "<IMG
SRC=\"../plugins/msg_flags/prio_high.gif\"
border=\"0\">\n";
216c224,225
<                         $td_str .= "<font color=\"$color[8]\">?</font>";
---
> /*                        $td_str .= "<font color=\"$color[8]\">?</font>"; */
>                       $td_str .= "<IMG SRC=\"../plugins/msg_flags/prio_low.gif\" 
>border=\"0\">\n";
220,223c229,234
<                 if (isset($msg['FLAG_DELETED']) && $msg['FLAG_DELETED'] ==
true) {
<                     $td_str .= "<font color=\"$color[1]\">D</font>";
<                     $stuff = true;
<                 }
---
> /*
>  *                if (isset($msg['FLAG_DELETED']) && $msg['FLAG_DELETED'] ==
true) {
>  *                    $td_str .= "<font color=\"$color[1]\">D</font>";
>  *                    $stuff = true;
>  *                }
> */
225c236,237
<                     $td_str .= '&nbsp;';
---
> /*                    $td_str .= '&nbsp;'; */
>                   $td_str .= "<IMG SRC=\"../plugins/msg_flags/transparent.gif\"
border=\"0\" width=\"6\">\n";
226a239
>               $td_str .= do_hook("msg_envelope");
723a737,738
>     echo getButton('SUBMIT', 'markFlagged',_("Flag"));
>     echo getButton('SUBMIT', 'markUnflagged',_("Unflag"));


-- 
Dan Rich <[EMAIL PROTECTED]> |   http://www.employees.org/~drich/
                               |  "Step up to red alert!"  "Are you sure, sir?
                               |   It means changing the bulb in the sign..."
                               |          - Red Dwarf (BBC)



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to