Esempio n. 1
0
if (!defined('__TYPECHO_ROOT_DIR__')) {
    exit;
}
$this->need('header.php');
?>
<div class="main-container">
    <article class="post preview" itemscope itemtype="http://schema.org/BlogPosting">
		<div class="post-author clearfix">
			<a class="fl" href="<?php 
$this->author->permalink();
?>
" title="<?php 
$this->author();
?>
"><img class="avatar" width="32" src="<?php 
echo gravatarUrl($this->author->mail, 32);
?>
" alt="" /></a>
			<a href="<?php 
$this->author->permalink();
?>
"><?php 
$this->author();
?>
</a>
			<span title="<?php 
_e('最后编辑于');
echo date('Y.m.d H:i:s', $this->modified);
?>
"><?php 
$this->date('Y.m.d H:i:s');
Esempio n. 2
0
    ?>
" id="comment-form" role="form">
			<div class="form-avatar">
				<?php 
    if ($this->user->hasLogin()) {
        $url = gravatarUrl($this->user->mail, 48, 'G', '');
        ?>
					<img src="<?php 
        echo $url;
        ?>
" width="48" class="avatar" />
				<?php 
    } elseif ($this->remember('mail', true)) {
        ?>
					<img src="<?php 
        echo gravatarUrl($this->remember('mail', true));
        ?>
" width="48" class="avatar" />
				<?php 
    } else {
        ?>
					<img src="<?php 
        $this->options->themeUrl('img/icon-avatar.png');
        ?>
" width="32" class="avatar" />
				<?php 
    }
    ?>
			</div>
            <?php 
    if ($this->user->hasLogin()) {
Esempio n. 3
0
/**
 * 重写评论显示函数
 */
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-meta">
        <div class="comment-meta-author" itemprop="creator" itemscope itemtype="http://schema.org/Person">
            <span itemprop="image">
			<img class="avatar" src="<?php 
    echo gravatarUrl($comments->mail, $options->avatarSize, null, $options->defaultAvatar);
    ?>
" width="<?php 
    echo $options->avatarSize;
    ?>
">
			</span>
            <cite class="fn" itemprop="name"><?php 
    $options->beforeAuthor();
    $comments->author();
    $options->afterAuthor();
    ?>
</cite>
        </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 
}
Esempio n. 4
0
/**
 * 重写评论显示函数
 */
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 id="li-<?php 
    $comments->theId();
    ?>
" class="<?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-body" id="<?php 
    $comments->theId();
    ?>
">
		<div class="comment-avatar">
            <?php 
    //$comments->gravatar(48, $options->defaultAvatar);
    ?>
			<img class="avatar" src="<?php 
    echo gravatarUrl($comments->mail, 48, null, $options->defaultAvatar);
    ?>
" alt="<?php 
    echo $comments->author;
    ?>
" width="48" height="48">
        </div>
    <div class="comment-meta">
        <div class="comment-meta-author">
           <?php 
    if ($comments->url) {
        ?>
			<a href="<?php 
        $comments->url();
        ?>
" rel="external nofollow" target="_blank"><?php 
        echo $comments->author;
        ?>
</a>
			<?php 
    } else {
        ?>
				<?php 
        $comments->author();
        ?>
			<?php 
    }
    ?>
        </div>
        <div class="comment-meta-time"><?php 
    $options->beforeDate();
    $comments->date($options->dateFormat);
    $options->afterDate();
    ?>
</div>
        <?php 
    if ('waiting' == $comments->status) {
        ?>
        <em class="comment-awaiting-moderation"><?php 
        $options->commentStatus();
        ?>
</em>
        <?php 
    }
    ?>
    </div>
    <div class="comment-content">
    <?php 
    $comments->content();
    //
    ?>
    </div>
     <div class="comment-meta-reply">
		<?php 
    $comments->reply($options->replyWord);
    ?>
	</div>
	</div>
    <?php 
    if ($comments->children) {
        ?>
    <div class="comment-children">
        <?php 
        $comments->threadedComments();
        ?>
    </div>
    <?php 
    }
    ?>
	
</li>
<?php 
}