示例#1
0
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank">' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
	<div class="comment comment-children" id="comment-<?php 
        echo $comment['cid'];
        ?>
">
		<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
		<?php 
        if ($isGravatar == 'y') {
            ?>
<div class="avatar"><img src="<?php 
            echo getGravatar($comment['mail']);
            ?>
" /></div><?php 
        }
        ?>
		<div class="comment-info">
			<b><?php 
        echo $comment['poster'];
        ?>
 </b><br /><span class="comment-time"><?php 
        echo $comment['date'];
        ?>
</span>
			<div class="comment-content"><?php 
        echo $comment['content'];
        ?>
</div>
			<?php 
        if ($comment['level'] < 4) {
            ?>
<div class="comment-reply"><a href="#comment-<?php 
            echo $comment['cid'];
            ?>
" onclick="commentReply(<?php 
            echo $comment['cid'];
            ?>
,this)">回复</a></div><?php 
        }
        ?>
		</div>
		<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
	</div>
	<?php 
    }
}
示例#2
0
文件: module.php 项目: jjonline/J4
function blog_comments_children($comments, $children)
{
    if (!$children) {
        return '';
    }
    ?>
	<ul class="children">
		<?php 
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $isNofollow = isset($comment['url']) && false === strpos($comment['url'], rtrim(BLOG_URL, '/')) ? 'rel="external nofollow"' : '';
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank" ' . $isNofollow . '>' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
		<li class="comment comment_children" id="comment-<?php 
        echo $comment['cid'];
        ?>
">
			<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
				<?php 
        if ($isGravatar == 'y') {
            echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/noAvator.jpg" data-src="' . $comment['figure'] . '" /></div>';
        } else {
            echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/noAvator.jpg" /></div>';
        }
        ?>
			<div class="comment-info">
				<div class="comment-content"><p><?php 
        echo comment2emoji($comment['content']);
        ?>
</p></div>
				<div class="comment-meata">
					<span class="comment-poster <?php 
        echo $comment['role'];
        ?>
" title="<?php 
        echo $comment['roledes'];
        ?>
"><?php 
        echo $comment['poster'];
        ?>
</span> 
					<span class="comment-time"><?php 
        if (strtotime($comment['date'])) {
            echo timeago(strtotime($comment['date']));
        } else {
            echo str_replace(' ', '', $comment['date']);
        }
        ?>
</span>
					<?php 
        if ($comment['level'] < 3) {
            echo '<a href="#comment-' . $comment['cid'] . '" onclick="commentReply(' . $comment['cid'] . ',this)" class="comment-reply-btn">回复</a>';
        }
        ?>
				</div>
			</div>
			<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
		</li>
		<?php 
    }
    ?>
	</ul>
<?php 
}
示例#3
0
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank">' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
	<ul class="children">
		<li class="comment byuser comment-author-caibaojian bypostauthor odd alt depth-2 list-group-item" id="comment-<?php 
        echo $comment['cid'];
        ?>
" data-comment-id="<?php 
        echo $comment['cid'];
        ?>
">
			<div class="comment-body" id="div-comment-<?php 
        echo $comment['cid'];
        ?>
">
				<img src="<?php 
        echo DuoshuoGravatar($comment['mail']);
        ?>
" class="avatar" width="50" height="50" />
				<cite class="fn" ><?php 
        echo $comment['poster'];
        ?>
</cite>
				<div class="comment-content"><p><?php 
        echo $comment['content'];
        ?>
</p></div>
				<div class="comment-meta">
					<time>2015-02-11 14:52</time><?php 
        if ($comment['level'] < 4) {
            ?>
<a href="#comment-<?php 
            echo $comment['cid'];
            ?>
" onclick="commentReply(<?php 
            echo $comment['cid'];
            ?>
,this)" rel="nofollow"><span class="glyphicon glyphicon-comment"></span>回复</a><?php 
        }
        ?>
				</div>
			</div>
		</li><!-- #comment-## -->
	<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
	</ul><!-- .children -->
	<?php 
    }
}
示例#4
0
文件: module.php 项目: jnan77/J2
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $isNofollow = $comment['url'] && $comment['url'] != BLOG_URL ? 'rel="nofollow"' : '';
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank" ' . $isNofollow . '>' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
	<div class="comment comment-children" id="comment-<?php 
        echo $comment['cid'];
        ?>
">
		<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
			<?php 
        if ($isGravatar == 'y') {
            echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/0.gif" data-src="' . J_getGravatar($comment['mail']) . '" /></div>';
        } else {
            echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/noAvator.jpg" /></div>';
        }
        ?>
		<div class="comment-info">
			<div class="comment-content"><?php 
        echo comment2emoji($comment['content']);
        ?>
</div>
			<div class="comment-meata">
				<span class="comment-poster"><?php 
        echo $comment['poster'];
        ?>
</span> 
				<span class="comment-time"><?php 
        if (strtotime($comment['date'])) {
            echo timeago(strtotime($comment['date']));
        } else {
            echo str_replace(' ', '', $comment['date']);
        }
        ?>
</span>
				<?php 
        if ($comment['level'] < 3) {
            echo '<a href="#comment-' . $comment['cid'] . '" onclick="commentReply(' . $comment['cid'] . ',this)" class="comment-reply-btn">回复</a>';
        }
        ?>
			</div>
		</div>
		<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
	</div>
	<?php 
    }
}
示例#5
0
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank">' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
	<ul id="commentlist" width="20px">
	<li class="comment comment-children" width="20px" id="comment-<?php 
        echo $comment['cid'];
        ?>
">
		<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
		<?php 
        if ($isGravatar == 'y') {
            ?>
		<div class="gravatar"><img src="<?php 
            echo getGravatar($comment['mail']);
            ?>
" height='48' width='48' /></div><?php 
        }
        ?>
			<div>
			<b><?php 
        echo $comment['poster'];
        ?>
 </b>
			<p><?php 
        echo $comment['content'];
        ?>
</p>
			<div class="commentMeta">
			<?php 
        echo $comment['date'];
        ?>
			
			<?php 
        if ($comment['level'] < 4) {
            ?>
			<a class='comment-reply-link' href="#comment-<?php 
            echo $comment['cid'];
            ?>
" onclick="commentReply(<?php 
            echo $comment['cid'];
            ?>
,this)">回复</a></div>
			<?php 
        }
        ?>
			<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
			</div>
	</li>
	</ul>
	<?php 
    }
}
function blog_comments_children($commentdb, $children)
{
    global $options, $article, $css;
    if ($children && is_array($children)) {
        foreach ($children as $child) {
            $comment = $commentdb[$child];
            $css = $css == 'rowa' ? 'rowb' : 'rowa';
            ?>
	<div class="comment comment-children <?php 
            echo $css;
            ?>
" id="comment-<?php 
            echo $child;
            ?>
">
		<a name="cm<?php 
            echo $child;
            ?>
"></a>
		<div class="comment_data">
			<?php 
            if ($comment['level'] < 5) {
                ?>
<a class="reply" href="javascript:void(0);" onclick="commentReply(<?php 
                echo $child;
                ?>
,this)">回复</a><?php 
            }
            ?>
			<?php 
            if ($options['show_avatar'] && $comment['avatardb']) {
                ?>
				<img alt="" class="avatar" src="<?php 
                echo $comment['avatardb']['src'];
                ?>
" width="<?php 
                echo $comment['avatardb']['size'];
                ?>
" height="<?php 
                echo $comment['avatardb']['size'];
                ?>
" />
			<?php 
            }
            ?>
			<span class="author">
				<?php 
            if ($comment['url']) {
                ?>
					<a href="<?php 
                echo $comment['url'];
                ?>
" rel="external nofollow" target="_blank"><?php 
                echo $comment['author'];
                ?>
</a>
				<?php 
            } else {
                echo $comment['author'];
            }
            ?>
			</span>
			<span><?php 
            echo $comment['dateline'];
            ?>
</span>
		</div>
		<div class="cmcontent" id="comm_<?php 
            echo $child;
            ?>
"><?php 
            echo $comment['content'];
            ?>
</div>
		<?php 
            blog_comments_children($commentdb, $comment['children']);
            ?>
	</div>
		<?php 
        }
    }
}
示例#7
0
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $comment['content'] = preg_replace("|\\[em_(\\d+)\\]|i", '<img src="' . BLOG_URL . 'admin/editor/plugins/emoticons/images/$1.gif" />', $comment['content']);
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank" class="upps">' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>
	<ol class="children">
		<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
        <li id="comment-<?php 
        echo $comment['cid'];
        ?>
" class="comment byuser comment-author-benz odd alt depth-2">
			<article id="div-comment-2035" class="comment-body">
			  <footer class="comment-meta">
					<div class="comment-author vcard">
                    		<?php 
        if ($isGravatar == 'y') {
            ?>
                            <img alt='' src='<?php 
            echo getGravatar($comment['mail']);
            ?>
' class='avatar avatar-70 wp-user-avatar wp-user-avatar-70 alignnone photo' height='70' width='70' /><?php 
        }
        ?>
                        <b class="fn"><strong><?php 
        echo $comment['poster'];
        ?>
</strong></b><span class="says">于<strong><span style="color:#FF9900;"><?php 
        echo $comment['date'];
        ?>
</span></strong> 回复道:</span>					</div>
				  <!-- .comment-author --><!-- .comment-metadata -->

			  </footer><!-- .comment-meta -->

				<div class="comment-content">
					<p><?php 
        echo $comment['content'];
        ?>
</p>
				</div><!-- .comment-content -->

				<div class="reply">
					<a class="comment-reply-login" href="#comment-<?php 
        echo $comment['cid'];
        ?>
" onclick="commentReply(<?php 
        echo $comment['cid'];
        ?>
,this)">回复</a>				</div><!-- .reply -->
			</article><!-- .comment-body -->
</li><!-- #comment-## -->
		<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
</ol><!-- .children -->
	<?php 
    }
}
示例#8
0
function blog_comments_children($comments, $children)
{
    $isGravatar = Option::get('isgravatar');
    foreach ($children as $child) {
        $comment = $comments[$child];
        $comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank">' . $comment['poster'] . '</a>' : $comment['poster'];
        ?>

	<ul class="children">
	<a name="<?php 
        echo $comment['cid'];
        ?>
"></a>
	<li id="li-comment-<?php 
        echo $comment['cid'];
        ?>
" class="comment">
		<div class="comment-wrapper" id="comment-<?php 
        echo $comment['cid'];
        ?>
">
			<div class="comment-meta">
				<div class="comment-author vcard">
					<?php 
        if ($isGravatar == 'y') {
            ?>
					<img width="28" height="28" class="avatar avatar-28 photo" src="<?php 
            echo myGravatar($comment['mail'], 28);
            ?>
" alt="" />
					<?php 
        }
        ?>
					<?php 
        echo $comment['poster'];
        ?>
<span class="says"> 说:</span>
					<time datetime="<?php 
        echo $comment['date'];
        ?>
" pubdate=""><?php 
        echo $comment['date'];
        ?>
</time>
				</div><!-- .comment-author .vcard -->
			</div>
			<div class="comment-content"><?php 
        echo $comment['content'];
        ?>
</div>
			<?php 
        if ($comment['level'] < 4) {
            ?>
			<div class="reply">
				<a href="#comment-<?php 
            echo $comment['cid'];
            ?>
" onclick="commentReply(<?php 
            echo $comment['cid'];
            ?>
,this)">回复</a>
			</div><!-- .reply -->
			<?php 
        }
        ?>
		</div><!-- #comment-## -->
		<?php 
        blog_comments_children($comments, $comment['children']);
        ?>
	</li>
</ul>
<?php 
    }
}