OSDN Git Service

applied some bug fixes
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / libs / COMMENTS.php
index e73736c..1336731 100755 (executable)
@@ -381,8 +381,13 @@ class COMMENTACTIONS extends BaseActions {
                        echo $this->currentComment['user'];\r
        }\r
        function parse_short() {\r
-               $tmp = strtok($this->currentComment['body'],"\n");\r
-               $tmp = str_replace('<br />','',$tmp);\r
+//             $tmp = strtok($this->currentComment['body'],"\n");\r
+//             $tmp = str_replace('<br />','',$tmp);\r
+               $tmp = strip_tags($this->currentComment['body']);\r
+               $tmp = mb_strimwidth($tmp, 0, 60, "...", "UTF-8");\r
+               $tmp = str_replace("\r\n", "\r", $tmp);\r
+               $tmp = str_replace("\r", "\n", $tmp);\r
+               $tmp = str_replace("\n",'&para;',$tmp);\r
                echo $tmp;\r
                if ($tmp != $this->currentComment['body'])\r
                        $this->parser->parse($this->template['COMMENTS_CONTINUED']); \r