From 49cdfcd7ce7edfd02e49e020cc8f4e7bed56d532 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Tue, 14 Apr 2020 15:31:29 +0800 Subject: =?UTF-8?q?:trollface:=20Perf:=20=E4=B8=BA=E5=8F=8B=E6=83=85?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=A4=B4=E5=83=8F=E8=AE=BE=E7=BD=AE=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E7=9A=84=E6=87=92=E5=8A=A0=E8=BD=BD=E5=9B=BE=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/loading/avatar.jpg | Bin 0 -> 8274 bytes libs/Contents.php | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 images/loading/avatar.jpg diff --git a/images/loading/avatar.jpg b/images/loading/avatar.jpg new file mode 100644 index 0000000..1239806 Binary files /dev/null and b/images/loading/avatar.jpg differ diff --git a/libs/Contents.php b/libs/Contents.php index 5a54e1f..992d6f0 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -14,11 +14,13 @@ class Contents $text = empty($last) ? $data : $last; if ($widget instanceof Widget_Archive) { //ParseOther - $text = Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip(Contents::parseLink($text)))))))); + $text = Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text))))))); //LazyLoad $text = preg_replace('//','',$text); //owo $text = Contents::parseEmo($text); + //Links + $text = Contents::parseLink($text); } return $text; } @@ -65,6 +67,14 @@ class Contents return $text; } + + /** + * 解析 Notice + */ + static public function parseNotice($text){ + $text = preg_replace('/\[notice\](.*?)\[\/notice\]/s','

${1}

',$text); + return $text; + } /** * 解析友链 @@ -80,7 +90,7 @@ class Contents $rp = '