summaryrefslogtreecommitdiffstats
path: root/includes/comments.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2020-02-26 23:26:37 +0800
committerGitHub <noreply@github.com>2020-02-26 23:26:37 +0800
commita5ad58aa4c587b1f7de42deda5afc0a52fe26242 (patch)
tree6b238285e3a757f986ca4774e2910a65fe28e372 /includes/comments.php
parentd10aa7ac65557004beb5e44060337f5feb945373 (diff)
parentc08f72691da5f1af30c699e44536b7367a98ce1a (diff)
Merge pull request #29 from ohmyga233/master
修复暗色下部分问题,新增 AJAX 提交评论
Diffstat (limited to 'includes/comments.php')
-rw-r--r--includes/comments.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/comments.php b/includes/comments.php
index cc53bc1..5bed2d5 100644
--- a/includes/comments.php
+++ b/includes/comments.php
@@ -9,7 +9,7 @@
}
$commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级
?>
-<div id="li-<?php $comments->theId(); ?>" class="comment-body<?php
+<div id="<?php $comments->theId(); ?>" class="comment-body<?php
if ($comments->_levels > 0) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
@@ -49,7 +49,7 @@ echo $commentClass;
<?php if($this->fields->commentShow == 0)://如果显示评论列表 ?>
<?php if ($comments->have())://如果有评论 则显示 ?>
<div class="comment-container">
- <h3 class="comment-title" id="response"><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h3>
+ <h3 class="comment-title" id="response"><?php $this->commentsNum(_t('暂无评论'), _t('已有 1 条评论'), _t('已有 %d 条评论')); ?></h3>
<?php $comments->listComments(array(
'before' => '<div class="comment-list">',
'after' => '</div>',
@@ -69,7 +69,7 @@ echo $commentClass;
<div class="comment-form">
<!-- 判断设置是否允许对当前文章进行评论 -->
<?php if($this->allow('comment')): ?>
- <div id="<?php $this->respondId(); ?>" class="respond">
+ <div id="<?php $this->respondId(); ?>" class="respond comment-box-id" data-commentUrl="<?php $this->commentUrl() ?>">
<div class="cancel-comment-reply">
<?php $comments->cancelReply(); ?>
</div>
@@ -95,7 +95,7 @@ echo $commentClass;
</p>
<p class="comment-submit-box">
<div title="OwO" class="OwO"></div>
- <button type="submit" class="comment-submit submit"><?php _e('评论'); ?></button>
+ <button type="submit" onclick="return MiraclesComment.submitComment();" class="comment-submit submit"><?php _e('评论'); ?></button>
</p>
</form>
</div>