Слияние кода завершено, страница обновится автоматически
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
function threadedComments($comments, $options) {
$commentClass = 'commentlist';
if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
$commentClass .= ' comment-by-author';
} else {
$commentClass .= ' comment-by-user' ;
}
}
$commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent';
if ($comments->url) {
$author = '<a href="' . $comments->url . '" target="_blank"' . ' rel="external nofollow">' . $comments->author . '</a>';
} else {
$author = $comments->author;
}
?>
<li id="<?php $comments->theId(); ?>" class="comment byuser comment-author-admin bypostauthor depth-<?php echo $comments->levels+1; ?> comment-body<?php
if ($comments->levels > 1) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
} else {
echo ' comment-parent';
}
$comments->alt(' odd', ' even');
?>">
<?php
$host = 'https://www.hiai.top/yuan/favicon.png';
$avatar = $host;
?>
<span class="comt-f"># <?php echo $comments->levels+1; ?></span>
<div class="comt-avatar">
<?php local_random_avatar($comments->author)?>
</div>
<div class="comt-main" id="div-<?php $comments->theId(); ?>">
<p><?php $comments->content(); ?></p>
<div class="comt-meta">
<span class="comt-author comt-font"><?php echo $comments->author; ?></span> <?php get_comment_at($comments->coid)?>
(<?php $comments->date('Y-m-d'); ?>) <?php $comments->reply('回复'); ?>
</div>
</div>
<?php if ( ($comments->children) && ($comments->levels+1 < 2)) { ?>
<ul class="children">
<?php $comments->threadedComments($options); ?>
</ul>
<?php }else{ ?>
<?php $comments->threadedComments($options); ?>
<?php } ?>
</li>
<?php } ?>
<?php $this->comments()->to($comments); ?>
<div class="title" id="comments">
<h3>评论 <?php $this->commentsNum('<small>抢沙发</small>', '<b>1</b>', '<b>%d</b>'); ?></h3>
</div>
<div id="<?php $this->respondId(); ?>" class="no_webshot">
<?php if(!$this->allow('comment')){ ?>
<h3 class="title">
<strong>文章评论已关闭!</strong>
</h3>
<?php }else{ ?>
<form action="<?php $this->commentUrl() ?>" method="post" id="commentform" >
<div class="comt">
<div class="comt-title">
<?php if($this->user->hasLogin()): ?>
<img src="<?php $this->options->themeUrl('img/avatar-default.png'); ?>" alt="用户头像" class="avatar avatar-50 photo">
<p><?php $this->user->screenName(); ?></p>
<?php else: ?>
<?php $aoptions = Typecho_Widget::widget('Widget_Options');?>
<img src="<?php $this->options->themeUrl('img/avatar-default.png'); ?>" alt="用户头像" class="avatar avatar-50 photo">
<?php endif; ?>
<p><?php $comments->cancelReply('取消'); ?></p>
</div>
<div class="comt-box">
<textarea placeholder="来都来了,随便说几句吧……" class="input-block-level comt-area" name="text" id="comment" cols="100%" rows="3" tabindex="1" required></textarea>
<div class="comt-ctrl">
<div class="comt-tips"></div>
<button type="submit" name="submit" id="submit" tabindex="5">提交评论</button>
<?php $security = $this->widget('Widget_Security'); ?>
<input type="hidden" name="_" value="<?php echo $security->getToken($this->request->getReferer())?>">
</div>
</div>
<?php if(!$this->user->hasLogin()): ?>
<div class="comt-comterinfo" id="comment-author-info" >
<ul>
<li class="form-inline"><label class="hide" for="author">昵称</label><input class="ipt" type="text" name="author" id="author" value="" tabindex="2" placeholder="昵称" required><span class="text-muted">昵称<span class="required text-danger">*</span></span></li>
<li class="form-inline"><label class="hide" for="mail">邮箱</label><input class="ipt" type="text" name="mail" id="mail" value="" tabindex="3" placeholder="邮箱" <?php if ($this->options->commentsRequireMail): ?> required <?php endif; ?>><span class="text-muted">邮箱 (必填)</span></li>
<li class="form-inline"><label class="hide" for="url">网址</label><input class="ipt" type="text" name="url" id="url" value="" tabindex="4" placeholder="网址"><span class="text-muted">网址</span></li>
</ul>
</div>
<?php endif; ?>
</div>
</form>
<?php } ?>
</div>
<?php if ($comments->have()) : ?>
<div id="postcomments">
<ol class="commentlist">
<?php $comments->listComments(array('before' => '','after' => '')); ?>
</ol>
<div class="pagenav"><?php $comments->pageNav('←','→','2','...'); ?></div>
</div>
<?php endif; ?>
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )