From fe5203e20eba8af3c1c9230d2acf0f5e73fc17b2 Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Fri, 19 Aug 2022 00:11:56 +0800 Subject: =?UTF-8?q?:stars:=20Perf:=20=E5=AE=8C=E5=85=A8=E9=87=8D=E5=86=99?= =?UTF-8?q?=E4=BA=86=E8=AF=84=E8=AE=BA=E5=8C=BA=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/comments.php | 121 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 34 deletions(-) (limited to 'includes/comments.php') diff --git a/includes/comments.php b/includes/comments.php index 4224085..0c18b3a 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -1,47 +1,100 @@ - +authorId) { + if ($comments->authorId == $comments->ownerId) { + $commentClass .= ' comment-by-author'; //如果是文章作者的评论添加 .comment-by-author 样式 + } else { + $commentClass .= ' comment-by-user'; //如果是评论作者的添加 .comment-by-user 样式 + } + } + $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级 +?> + + +
comments()->to($comments); ?> - have()): ?> -

commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?>

- - listComments(); ?> - - pageNav('«', '»'); ?> - - - allow('comment')): ?>
-
- cancelReply(); ?> -
+

添加新评论cancelReply(); ?>

- user->hasLogin()): ?> -

- - - user->screenName(); ?> - - . - - - » - -

-
- -
- - options->commentsRequireMail): ?> required /> - options->commentsRequireURL): ?> required /> - - - +
+ +
+
+ user->hasLogin()): ?> +
+ author->gravatar(32); ?> + +
+ + + options->commentsRequireMail): ?> required /> + options->commentsRequireURL): ?> required /> + + +
+
+
+ +
+ + +
+

+ + have()): ?> + listComments(); ?> +
pageNav('«', '»'); ?>
+
\ No newline at end of file -- cgit v1.2.3