Пример #1
0
function latest_comments_sidebar_module($args)
{
    global $wpdb, $comment;
    extract($args);
    echo $before_module . $before_title . $title . $after_title;
    ?>
	<a href="<?php 
    bloginfo('comments_rss2_url');
    ?>
" title="<?php 
    _e('RSS Feed for all Comments', 'k2_domain');
    ?>
" class="feedlink"><img src="<?php 
    bloginfo('template_directory');
    ?>
/images/feed.png" alt="RSS" /></a>

	<?php 
    if (function_exists('blc_latest_comments')) {
        ?>
		<ul>
			<?php 
        blc_latest_comments(sbm_get_option('num_posts'), sbm_get_option('num_comments'), sbm_get_option('hide_trackbacks'), "<li class='alternate'>", '</li>', true, 10, sbm_get_option('new_color'), sbm_get_option('old_color'));
        ?>
		</ul>
	<?php 
    } else {
        $num_comments = sbm_get_option('num_comments');
        $sql = "SELECT comment_ID, comment_post_ID, comment_author, comment_author_url FROM {$wpdb->comments} WHERE comment_approved = '1' ";
        if (sbm_get_option('hide_trackbacks') == true) {
            $sql .= "AND comment_type = '' ";
        }
        $sql .= "ORDER BY comment_date_gmt DESC LIMIT {$num_comments}";
        $comments = $wpdb->get_results($sql);
        if ($comments) {
            ?>
		<ul>
			<?php 
            foreach ($comments as $comment) {
                ?>
				<li><?php 
                printf(__('%1$s %2$s <a href="%3$s#comment-%4$s">%5$s</a>', 'k2_domain'), get_comment_author_link(), __('on the post', 'k2_domain'), get_permalink($comment->comment_post_ID), $comment->comment_ID, get_the_title($comment->comment_post_ID));
                ?>
</li>
			<?php 
            }
            ?>
		</ul>
		<?php 
        } else {
            ?>
			<p><?php 
            _e('No comments', 'k2_domain');
            ?>
</p>
		<?php 
        }
    }
    echo $after_module;
}
Пример #2
0
/images/logo.png" alt="<?php 
bloginfo('name');
?>
" border="0" /></a> -->
<ul class="latest">
<?php 
wp_get_archives('type=postbypost&limit=5');
?>
</ul>




<?php 
if (function_exists('blc_latest_comments')) {
    ?>

<ul class='latestactivity'>
<?php 
    blc_latest_comments('5', '4', 'false', '<li>', '</li>', 'false', '10', '#666666', '#666666');
    ?>
</ul>

<?php 
}
?>
 



</div>
Пример #3
0
        _e('Comments', 'k2_domain');
        ?>
</h4>	
		<span class="metalink"><a href="<?php 
        bloginfo('comments_rss2_url');
        ?>
" title="<?php 
        _e('RSS Feed for all Comments', 'k2_domain');
        ?>
" class="feedlink"><img src="<?php 
        bloginfo('template_directory');
        ?>
/images/feed.png" alt="RSS" /></a></span>
		<ul>
			<?php 
        blc_latest_comments('5', '3', 'false');
        ?>
		</ul>
	</div>
	<?php 
    }
    ?>

	<?php 
    /* Latest Entries */
    if (is_home() or (is_search() or is_404() or defined('K2_NOT_FOUND')) or function_exists('is_tag') and is_tag() or is_archive() and !is_author()) {
        ?>
	<div class="sb-latest">
		<h4><?php 
        _e('Latest', 'k2_domain');
        ?>