=?utf-8?q?Bon=20en=20fait=20skinnage=20des=20blockquote=20par=20la=20CSS
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 4 Mar 2006 11:10:38 +0000 (11:10 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:36 +0000 (00:34 +0100)
=20Avec=20possibilit=C3=83=C2=A9=20de=20skinnage=20en=20fonction=20de=20la=20profondeur=20de=20la=20citation?=
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@27 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/misc.inc.php
css/style.css

index c5b6b32..27cb940 100644 (file)
@@ -323,13 +323,12 @@ function formatbody($_text, $format='plain')
         $res = preg_replace("@<br[^>]*>\n?-- \n?(<p[^>]*>)@", "<br/>-- <br/>\\2", $res);
         $parts = preg_split("@(:?<p[^>]*>\n?-- \n?</p>|<br[^>]*>\n?-- \n?<br[^>]*>)@", $res);
     } else {
-       $i=0;
-        while (preg_match("@(^|<pre>|\n)&gt;@i", $res)) {
+        for ($i = 1 ; preg_match("@(^|<pre>|\n)&gt;@i", $res) ; $i++) {
             $res  = preg_replace("@(^|<pre>|\n)((&gt;[^\n]*\n)+)@ie",
-               "'\\1</pre><blockquote style=\' margin-left: 0; padding-left: 1em; border-left: solid 1px; border-color: blue; \'><pre>'"
-                   .".stripslashes(preg_replace('@(^|<pre>|\n)&gt;[ \\t\\r]*@i', '\\1', '\\2'))"
-                   .".'</pre></blockquote><pre>'",
-               $res);
+                "'\\1</pre><blockquote class=\'level$i\'><pre>'"
+                   .".stripslashes(preg_replace('@(^|<pre>|\n)&gt;[ \\t\\r]*@i', '\\1', '\\2'))"
+                   .".'</pre></blockquote><pre>'",
+                   $res);
         }
        $res = preg_replace("@<pre>-- ?\n@", "<pre>\n-- \n", $res);
         $parts = preg_split("/\n-- ?\n/", $res);
index fe1d341..64f43f5 100644 (file)
@@ -35,6 +35,15 @@ table.banana_msg .hdr { width: 15%; text-align: right; font-weight: bold; paddin
 table.banana_msg td.thrd { padding: 0px; }
 table.banana_msg table { border: 0px; padding: 0px; margin: 0px; width: 100%; }
 
+table.banana_msg blockquote {
+        color: green;
+        font-style: italic;
+        margin-left: 0;
+        padding-left: 1em;
+        border-left: solid 1px;
+        border-color: blue;
+}
+
 /** MISC **/
 
 div.center { text-align: center; padding: 1em; }