diff options
| -rw-r--r-- | includes/comments.php | 66 |
1 files changed, 25 insertions, 41 deletions
diff --git a/includes/comments.php b/includes/comments.php index e5f0dec..61021ef 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -28,7 +28,7 @@ echo $commentClass; <span class="comment-reply">
<?php $comments->reply('<i class="iconfont icon-return"></i>'); ?>
</span>
- <?php Contents::commentsParent($comments); $comments->content(); ?>
+ <?php getCommentHF($comments->coid); $comments->content(); ?>
</div>
<p class="comment-meta">
<span class="comment-author"><?php $comments->author(); ?></span>
@@ -43,24 +43,24 @@ echo $commentClass; <?php } ?>
</div>
<?php } ?>
+
<div class="comment">
<?php $this->comments()->to($comments); ?>
<?php if($this->fields->commentShow == 0)://如果显示评论列表 ?>
- <h3 class="comment-title">
- <?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?>
- </h3>
<?php if ($comments->have())://如果有评论 则显示 ?>
<div class="comment-container">
+ <h3 class="comment-title"><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h3>
<?php $comments->listComments(array(
'before' => '<div class="comment-list">',
'after' => '</div>',
'avatarSize' => 200,
'dateFormat' => 'Y-m-d H:i'
)); ?>
+ <div class="comment-pagenav">
+ <?php $comments->pageNav('<i class="iconfont icon-chevron-left comment-pagenav-icon"></i>', '<i class="iconfont icon-chevron-right comment-pagenav-icon"></i>'); ?>
+ </div>
</div>
- <div class="comment-pagenav">
- <?php $comments->pageNav('<i class="iconfont icon-chevron-left comment-pagenav-icon"></i>', '<i class="iconfont icon-chevron-right comment-pagenav-icon"></i>'); ?>
- </div>
+
<?php endif;//有无评论判断结束?>
<?php else: //如果不显示评论列表 ?>
<?php if($this->allow('comment')): ?><div class="comment-hidden">博主已关闭本页面的评论显示<?php if($this->allow('comment')): ?>,您评论后将不会看到您的评论内容<?php endif; ?></div><?php endif; ?>
@@ -69,52 +69,36 @@ echo $commentClass; <div class="comment-form">
<!-- 判断设置是否允许对当前文章进行评论 -->
<?php if($this->allow('comment')): ?>
- <div id="<?php $this->respondId(); ?>" class="respond">
- <div class="cancel-comment-reply">
- <?php $comments->cancelReply(); ?>
- </div>
+ <div id="<?php $this->respondId(); ?>" class="respond">
+ <div class="cancel-comment-reply">
+ <?php $comments->cancelReply(); ?>
+ </div>
- <h3 id="response"><?php _e('添加新评论'); ?></h3>
<!-- 输入表单开始 -->
- <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
-<!-- 输入要回复的内容 -->
- <div class="container-fluid"><div class="row">
- <p class="col-md-12">
- <textarea rows="8" cols="50" name="text" id="textarea" class="OwO-textarea comment-textarea textarea" required ><?php $this->remember('text'); ?></textarea>
- </p>
- </div></div>
+ <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
<!-- 如果当前用户已经登录 -->
<?php if($this->user->hasLogin()): ?>
<!-- 显示当前登录用户的用户名以及登出连接 -->
- <p class="col-md-12"><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
+ <p class="col-md-12 comment-logined-sign"><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
<!-- 若当前用户未登录 -->
<?php else: ?>
<!-- 要求输入名字、邮箱、网址 -->
- <div class="container-fluid comment-input"><div class="row">
- <p class="col-md-4">
- <label for="author" class="required"><?php _e('称呼'); ?></label>
- <input type="text" name="author" id="author" class="text" placeholder="称呼" value="<?php $this->remember('author'); ?>" required />
- </p>
- <p class="col-md-4">
- <label for="mail"<?php if ($this->options->commentsRequireMail): ?> class="required"<?php endif; ?>><?php _e('Email'); ?></label>
- <input type="email" name="mail" id="mail" class="text" placeholder="邮箱" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
- </p>
- <p class="col-md-4">
- <label for="url"<?php if ($this->options->commentsRequireURL): ?> class="required"<?php endif; ?>><?php _e('网站'); ?></label>
+ <div class="comment-input">
+ <input type="text" name="author" id="author" class="text" placeholder="称呼*" value="<?php $this->remember('author'); ?>" required />
+ <input type="email" name="mail" id="mail" class="text" placeholder="邮箱*" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
<input type="url" name="url" id="url" class="text" placeholder="<?php _e('http://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
- </p>
- </div></div>
+ </div>
<?php endif; ?>
- <div class="container-fluid"><div class="row">
- <p class="col-md-12 owo-para">
+<!-- 输入要回复的内容 -->
+ <p>
+ <textarea rows="8" name="text" id="textarea" class="OwO-textarea comment-textarea textarea" required ><?php $this->remember('text'); ?></textarea>
+ </p>
+ <p class="comment-submit-box">
<div title="OwO" class="OwO"></div>
- </p>
- <p class="comment-submit col-md-12">
- <button type="submit" class="submit"><?php _e('提交评论'); ?></button>
+ <button type="submit" class="comment-submit submit"><?php _e('评论'); ?></button>
</p>
- </div></div>
- </form>
- </div>
+ </form>
+ </div>
<!-- 若当前文章不允许进行评论 -->
<?php else: ?>
<div class="comment-hidden"><?php _e('博主已关闭本页面的评论功能'); ?></div>
|
