From: x2003bruneau Date: Sun, 12 Mar 2006 22:13:47 +0000 (+0000) Subject: Permet le formatage des x-face différemment du reste des headers... X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ca3b1040e996c4f18adc52b130b3438f601e26af;p=banana.git Permet le formatage des x-face différemment du reste des headers... S'inspire du formatage de kmail/knode (x-face à droite dans les headers) git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@40 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/banana.inc.php.in b/banana/banana.inc.php.in index a8a42d7..ab4e6da 100644 --- a/banana/banana.inc.php.in +++ b/banana/banana.inc.php.in @@ -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.* diff --git a/banana/post.inc.php b/banana/post.inc.php index 4c53722..c94b1fd 100644 --- a/banana/post.inc.php +++ b/banana/post.inc.php @@ -336,15 +336,24 @@ class BananaPost $res = ''; $res .= ''; + $res .= ''; $res .= '
'._b_('En-têtes').'
'; 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 .= '\n"; + } else if ($res2) { + $xface = $res2; } } } + $res .= '
'.header_translate($hdr)."$res2
'; + + if ($xface) { + $res .= $xface; + } + $res .= '
'._b_('Corps'); if (count($this->messages) > 1) { diff --git a/css/style.css b/css/style.css index 64f43f5..820179a 100644 --- a/css/style.css +++ b/css/style.css @@ -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%; }