=?utf-8?q?Permet=20le=20formatage=20des=20x-face=20diff=C3=83=C2=A9remment=20du=20res...
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sun, 12 Mar 2006 22:13:47 +0000 (22:13 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:40 +0000 (00:34 +0100)
=20S'inspire=20du=20formatage=20de=20kmail/knode=20(x-face=20=C3=83=C2=A0=20droite=20dans=20les=20headers)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@40 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in
banana/post.inc.php
css/style.css

index a8a42d7..ab4e6da 100644 (file)
@@ -24,7 +24,10 @@ class Banana
     var $can_attach  = true;
     /** Maximum allowed file size for attachment
      */
-    var $maxfilesize = 100000;  
+    var $maxfilesize = 100000;
+    /** Indicate wether x-face should be skinned as specials data or not
+     */
+    var $formatxface = true;
 
     /** Regexp for selecting newsgroups to show (if empty, match all newsgroups)
      * ex : '^xorg\..*' for xorg.*
index 4c53722..c94b1fd 100644 (file)
@@ -336,15 +336,24 @@ class BananaPost
 
         $res  = '<table class="bicol banana_msg" cellpadding="0" cellspacing="0">';
         $res .= '<tr><th colspan="2">'._b_('En-tĂȘtes').'</th></tr>';
+        $res .= '<tr><td class="headers"><table cellpadding="0" cellspacing="0">';
 
         foreach ($banana->show_hdr as $hdr) {
             if (isset($this->headers[$hdr])) {
                 $res2 = formatdisplayheader($hdr, $this->headers[$hdr]);
-                if ($res2) {
+                if ($res2 && ($hdr != 'x-face' || !$banana->formatxface)) {
                     $res .= '<tr><td class="hdr">'.header_translate($hdr)."</td><td class='val'>$res2</td></tr>\n";
+                } else if ($res2) {
+                    $xface = $res2;
                 }
             }
         }
+        $res .= '</table></td><td class="xface">';
+
+        if ($xface) {
+            $res .= $xface;
+        }
+        $res .= '</td></tr>';
 
         $res .= '<tr><th colspan="2">'._b_('Corps');
         if (count($this->messages) > 1) {
index 64f43f5..820179a 100644 (file)
@@ -30,7 +30,9 @@ table.banana_thread span.cur { font-style: italic; font-size: 90%; }
 
 /** MESSAGE VIEW **/
 
+table.banana_msg td.headers { width: 100%; }
 table.banana_msg .hdr { width: 15%; text-align: right; font-weight: bold; padding-right: 1em; }
+table.banana_msg td.xface { text-align: right; }
 
 table.banana_msg td.thrd { padding: 0px; }
 table.banana_msg table { border: 0px; padding: 0px; margin: 0px; width: 100%; }