From e6f3df7eaf6881a303358289dadb904824872d45 Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Wed, 7 Oct 2020 20:40:09 +0800 Subject: bring back the 1.x files to master --- includes/comments.php | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 includes/comments.php (limited to 'includes/comments.php') diff --git a/includes/comments.php b/includes/comments.php new file mode 100644 index 0000000..c61842d --- /dev/null +++ b/includes/comments.php @@ -0,0 +1,112 @@ +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); ?> + fields->commentShow == 0)://如果显示评论列表 ?> + have())://如果有评论 则显示 ?> +
+

commentsNum(_t(gt('commentListTexts','commentNumNone')), _t(gta('commentListTexts','commentNum','1')), _t(gta('commentListTexts','commentNum','%d'))); ?>

+ listComments(array( + 'before' => '
', + 'after' => '
', + 'avatarSize' => 200, + 'dateFormat' => 'Y-m-d H:i' + )); ?> +
+ pageNav('', ''); ?> +
+
+ + + + allow('comment')): ?>
+ + +
+ + allow('comment')): ?> +
+ +
+ + user->hasLogin()): ?> + +

user->screenName(); ?>.

+ + + +
+ + options->commentsRequireMail): ?> required /> + options->commentsRequireURL): ?> required /> +
+ + +

+ +

+

+

+
cancelReply(); ?>
+ +

+
+
+ + +
+ +
+
+ options->commentsAntiSpam) { Comments::AntiSpam($this->respondId, Typecho_Common::shuffleScriptVar($this->security->getToken(preg_replace('/\??&?_pjax=[^&]+/i','',$this->request->getRequestUrl())))); } ?> -- cgit v1.2.3