Example #1
0
<?php

/**
 * 标签云
 *
 * @package custom
 */
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">
			<h2 class="post-title"><?php 
$this->title();
?>
</h2>
		</div>
        <div class="post-content" itemprop="articleBody">
            <ul class="tag-list">
                <?php 
Tools_Plugin::tagCloud(null, '<li><a href="{permalink}">{name}({count})</a></li>');
?>
            </ul>
        </div>
    </article>
</div><!-- end #main-->
<?php 
$this->need('footer.php');
Example #2
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-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 
}
Example #3
0
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);
?>
Example #4
0
    exit;
}
if (!$this->request->isAjax()) {
    $this->need('header.php');
}
?>
<div class="main-inner">
	<?php 
while ($this->next()) {
    ?>
		<article class="post">
			<?php 
    if (!empty($this->options->listStyle) && in_array('thumb', $this->options->listStyle)) {
        ?>
				<?php 
        Tools_Plugin::thumbnail($this);
        ?>
			<?php 
    }
    ?>
			<div class="post-header">
				<div class="post-meta"><a href="<?php 
    $this->author->permalink();
    ?>
"><strong><?php 
    $this->author();
    ?>
</strong></a><em>·</em><?php 
    $this->dateWord();
    ?>
</div>