Example #1
0
function hui_post_excerpt()
{
    $listtype = _hui('list_type');
    while (have_posts()) {
        the_post();
        $classname = '';
        $focus = '';
        if ($listtype !== 'none') {
            $imgNum = hui_post_images_number();
            $has_thumb = has_post_thumbnail();
            if ($listtype == 'thumb') {
                $imgSingle = true;
                if ($has_thumb || $imgNum > 0) {
                    $classname = ' excerpt-one';
                }
            } else {
                if ($listtype == 'multi') {
                    $imgSingle = false;
                    if ($has_thumb || $imgNum > 0 && $imgNum < 4) {
                        $classname = ' excerpt-one';
                    } else {
                        if (!$has_thumb && $imgNum >= 4) {
                            $classname = ' excerpt-multi';
                        }
                    }
                }
            }
            $focus = hui_get_thumbnail($imgSingle, false);
            $focus = $focus ? '<p class="focus"><a' . hui_target_blank() . ' href="' . get_permalink() . '" class="thumbnail">' . $focus . '</a></p>' : '';
        }
        $pls = _hui('post_plugin');
        $author = get_the_author();
        if (_hui('author_link')) {
            $author = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a>';
        }
        echo '<article class="excerpt' . $classname . '">';
        echo '<header>';
        if (!is_category()) {
            $category = get_the_category();
            if ($category[0]) {
                echo '<a class="cat label label-important" href="' . get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '<i class="label-arrow"></i></a> ';
            }
        }
        echo '<h2><a' . hui_target_blank() . ' href="' . get_permalink() . '" title="' . get_the_title() . _hui('connector') . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
        if ($imgNum) {
            echo '<small class="text-muted"><span class="glyphicon glyphicon-picture"></span>' . $imgNum . '</small>';
        }
        echo '</header>', '<p class="text-muted time">' . ($pls && $pls['siteauthor'] ? get_bloginfo('name') . ' - ' : '') . $author . ' ' . __('发布于', 'haoui') . ' ' . timeago(get_gmt_from_date(get_the_time('Y-m-d G:i:s'))) . '</p>', $focus, '<p class="note">' . hui_get_excerpt_content() . '</p>', '<p class="text-muted views">' . hui_get_views() . '</span>', $pls && $pls['comm'] ? '<span class="post-comments">' . hui_get_comment_number() . '</span>' : '', hui_get_post_like($class = 'post-like'), the_tags('<span class="post-tags">' . __('标签:', 'haoui'), ' / ', '</span>'), '</p>';
        echo '</article>';
    }
    wp_reset_query();
    hui_paging();
}
Example #2
0
    $previous_month = $month;
    ?>
                <li>
                    <time><?php 
    the_time('d');
    ?>
日</time>
                    <a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
 </a>
                    <span class="text-muted"><?php 
    echo hui_get_comment_number();
    ?>
</span>
                </li>
            <?php 
}
?>
            </ul>
        </div>
        </article>
    </div>
</div>
<?php 
if (_hui('archives_sidebar_s')) {
    get_sidebar();
}
Example #3
0
    echo __('退出', 'haoui');
    ?>
</a>
	<?php 
} else {
    if (!empty($comment_author)) {
        echo '<a href="javascript:;" data-event="comment-user-change"><span class="glyphicon glyphicon-user"></span> ' . __('更换用户', 'haoui') . '</a>';
    }
}
?>
	</div>
	<strong><?php 
echo _hui('comment_title');
?>
 <?php 
echo hui_get_comment_number(' ', ' ') ? '<b>' . hui_get_comment_number(' ', ' ') . '</b>' : '<small>' . __('抢沙发', 'haoui') . '</small>';
?>
</strong>
</h3>
<div id="respond" class="no_webshot">
	<?php 
if (get_option('comment_registration') && !is_user_logged_in()) {
    ?>
	<div class="comment-signarea">
		<h3 class="text-muted"><?php 
    echo __('评论前必须登录!', 'haoui');
    ?>
</h3>
	</div>
	<?php 
} elseif (get_option('close_comments_for_old_posts') && $closeTimer > get_option('close_comments_days_old')) {
Example #4
0
    echo wp_logout_url();
    ?>
"><span class="glyphicon glyphicon-user"></span> 退出</a>
	<?php 
} else {
    if (!empty($comment_author)) {
        echo '<a href="javascript:;" data-event="comment-user-change"><span class="glyphicon glyphicon-user"></span> 更换用户</a>';
    }
}
?>
	</div>
	<strong><?php 
echo _hui('comment_title');
?>
 <?php 
echo hui_get_comment_number('', '') ? '<b>' . hui_get_comment_number('', '') . '</b>' : '<small>抢沙发</small>';
?>
</strong>
</h3>
<div id="respond" class="no_webshot">
	<?php 
if (get_option('comment_registration') && !is_user_logged_in()) {
    ?>
	<div class="comment-signarea">
		<h3 class="text-muted">评论前必须登录!</h3>
	</div>
	<?php 
} elseif (get_option('close_comments_for_old_posts') && $closeTimer > get_option('close_comments_days_old')) {
    ?>
	<h3 class="title">
		<strong>文章评论已关闭!</strong>
Example #5
0
            }
        }
        $focuscode = hui_get_thumbnail($imgSingle, false);
        $focuscode = $focuscode ? '<p class="focus"><a' . hui_target_blank() . ' href="' . get_permalink() . '" class="thumbnail">' . $focuscode . '</a></p>' : '';
    }
    $author = get_the_author();
    if (_hui('author_link')) {
        $author = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a>';
    }
    $p_meta = _hui('post_plugin');
    echo '<article class="excerpt' . $classname . '">';
    echo '<header>';
    if (!is_category()) {
        $category = get_the_category();
        if ($category[0]) {
            echo '<a class="cat label label-important" href="' . get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '<i class="label-arrow"></i></a> ';
        }
    }
    echo '<h2><a' . hui_target_blank() . ' href="' . get_permalink() . '" title="' . get_the_title() . _hui('connector') . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
    if ($img_number) {
        echo '<small class="text-muted"><span class="glyphicon glyphicon-picture"></span>' . $img_number . '</small>';
    }
    echo '</header>', '<p class="text-muted time">' . ($p_meta && $p_meta['siteauthor'] ? get_bloginfo('name') . ' - ' : '') . $author . ' ' . __('发布于', 'haoui') . ' ' . hui_get_post_date(get_gmt_from_date(get_the_time('Y-m-d G:i:s'))) . '</p>', $focuscode, '<p class="note">' . hui_get_excerpt_content() . '</p>', '<p class="text-muted views">';
    if (_hui('post_link_excerpt_s')) {
        hui_post_link();
    }
    echo hui_get_views(), $p_meta && $p_meta['comm'] ? '<span class="post-comments">' . hui_get_comment_number() . '</span>' : '', hui_get_post_like($class = 'post-like'), the_tags('<span class="post-tags">' . __('标签:', 'haoui'), ' / ', '</span>'), '</p>';
    echo '</article>';
}
hui_paging();
wp_reset_query();
Example #6
0
			<?php 
    the_content();
    ?>
		</article>
		<?php 
}
?>
		<div class="article-social">
			<?php 
echo hui_get_post_like($class = 'action action-like');
?>
			<a href="#comments" class="action action-comment" data-event="<?php 
echo is_user_logged_in() ? 'comment' : 'login';
?>
"><i class="glyphicon glyphicon-comment"></i><span><?php 
echo hui_get_comment_number('评论 (');
?>
</span></a>
			<span class="action action-share bdsharebuttonbox">
				<i class="glyphicon glyphicon-share"></i>分享 (<span class="bds_count" data-cmd="count"></span>)
				<div class="action-popover">
				<div class="popover top in"><div class="arrow"></div><div class="popover-content"><a class="bds_qzone" data-cmd="qzone"></a><a class="bds_tsina" data-cmd="tsina"></a><a class="bds_weixin" data-cmd="weixin"></a><a class="bds_tqq" data-cmd="tqq"></a><a class="bds_sqq" data-cmd="sqq"></a><a class="bds_renren" data-cmd="renren"></a></div></div></div>
			</span>
		</div>
		<div class="article-tags">
			<?php 
the_tags('标签:', '', '');
?>
		</div>
		<?php 
if (_hui('ads_post_02_s')) {