65 lines
3.2 KiB
PHP
65 lines
3.2 KiB
PHP
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|
|
|
<div id="comments" class="comments">
|
|
<?php $this->comments()->to($comments); ?>
|
|
|
|
<?php if ($comments->have()): ?>
|
|
|
|
<?php $comments->listComments(array(
|
|
'before' => '<div class="comment-list">',
|
|
'after' => '</div>',
|
|
'beforeAuthor' => '',
|
|
'afterAuthor' => '',
|
|
'beforeDate' => '',
|
|
'afterDate' => '',
|
|
'dateFormat' => 'Y-m-d H:i',
|
|
'replyWord' => _t('回复'),
|
|
'commentStatus' => _t('您的评论正等待审核!'),
|
|
'avatarSize' => 40,
|
|
'callback' => 'themeCommentList'
|
|
)); ?>
|
|
|
|
|
|
<?php if($comments->pageNav()): ?>
|
|
<div class="comments-pagination pagination">
|
|
<?php $comments->pageNav('«', '»', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'page-navigator', 'itemTag' => '', 'textTag' => 'span', 'currentClass' => 'current', 'prevClass' => 'prev', 'nextClass' => 'next')); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if($this->allow('comment')): ?>
|
|
<div id="<?php $this->respondId(); ?>" class="respond">
|
|
<h3 id="response" class="comment-reply-title"><?php _e('发表评论'); ?></h3>
|
|
|
|
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
|
|
<?php if($this->user->hasLogin()): ?>
|
|
<p><?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 $comments->cancelReply(); ?>
|
|
<p>
|
|
<textarea name="text" id="textarea" class="textarea" placeholder="<?php _e('评论内容...'); ?>" required ><?php $this->remember('text'); ?></textarea>
|
|
</p>
|
|
<?php else: ?>
|
|
<?php $comments->cancelReply(); ?>
|
|
<p>
|
|
<textarea name="text" id="textarea" class="textarea" placeholder="<?php _e('评论内容...'); ?>" required ><?php $this->remember('text'); ?></textarea>
|
|
</p>
|
|
<p>
|
|
<input type="text" name="author" id="author" class="text" placeholder="<?php _e('称呼'); ?>" value="<?php $this->remember('author'); ?>" required />
|
|
<input type="email" name="mail" id="mail" class="text" placeholder="<?php _e('邮箱'); ?>" 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('网站'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<p>
|
|
<button type="submit" class="submit"><?php _e('提交评论'); ?></button>
|
|
|
|
</p>
|
|
</form>
|
|
</div>
|
|
<?php else: ?>
|
|
<h3><?php _e('评论已关闭'); ?></h3>
|
|
<?php endif; ?>
|
|
</div><!-- #comments -->
|