if (!defined('__TYPECHO_ROOT_DIR__')) { exit; } $this->need('header.php'); ?> <div class="main-inner"> <article class="post" itemscope itemtype="http://schema.org/BlogPosting"> <div class="post-header"> <div class="post-author clearfix"> <a class="avatar fleft" href="<?php $this->author->permalink(); ?> "><img width="48" src="<?php echo Tools_Plugin::gravatarUrl($this->author->mail, 48); ?> " alt="" /></a> <p><span class="label"><?php _e('作者'); ?> </span> <a href="<?php $this->author->permalink(); ?> "><?php $this->author(); ?> </a> <span title="<?php _e('最后编辑于'); echo date('Y.m.d H:i:s', $this->modified); ?>
/** * 重写评论显示函数 */ function threadedComments($comments, $options) { $commentClass = ''; 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'; ?> <li itemscope itemtype="http://schema.org/UserComments" id="<?php $comments->theId(); ?> " class="comment-body<?php if ($comments->levels > 0) { echo ' comment-child'; $comments->levelsAlt(' comment-level-odd', ' comment-level-even'); } else { echo ' comment-parent'; } $comments->alt(' comment-odd', ' comment-even'); echo $commentClass; ?> "> <div class="comment-avatar"> <img class="avatar" src="<?php echo Tools_Plugin::gravatarUrl($comments->mail, $options->avatarSize, null, $options->defaultAvatar); ?> " width="<?php echo $options->avatarSize; ?> "> </div> <div class="comment-meta"> <div class="comment-meta-author"><?php $comments->author(); ?> </div> <div class="comment-meta-time"> <a href="<?php $comments->permalink(); ?> "><time itemprop="commentTime" datetime="<?php $comments->date('c'); ?> "><?php $options->beforeDate(); $comments->date($options->dateFormat); $options->afterDate(); ?> </time></a> </div> <?php if ('waiting' == $comments->status) { ?> <em class="comment-awaiting-moderation"><?php $options->commentStatus(); ?> </em> <?php } ?> <div class="comment-meta-reply"> <?php $comments->reply($options->replyWord); ?> </div> </div> <div class="comment-content" itemprop="commentText"> <?php $comments->content(); ?> </div> <?php if ($comments->children) { ?> <div class="comment-children" itemprop="discusses"> <?php $comments->threadedComments(); ?> </div> <?php } ?> </li> <?php }