コード例 #1
0
    function ipt_kb_bbp_forum_freshness_in_list($forum_id = 0)
    {
        $author_link = bbp_get_author_link(array('post_id' => bbp_get_forum_last_active_id($forum_id), 'type' => 'name'));
        $freshness = bbp_get_author_link(array('post_id' => bbp_get_forum_last_active_id($forum_id), 'size' => 32, 'type' => 'avatar'));
        if (!empty($freshness)) {
            ?>
<span class="pull-left thumbnail">
	<?php 
            echo $freshness;
            ?>
</span>
<?php 
        }
        do_action('bbp_theme_before_forum_freshness_link');
        ?>
<ul class="list-unstyled ipt_kb_forum_freshness_meta">
	<li class="bbp-topic-freshness-link"><?php 
        bbp_forum_freshness_link($forum_id);
        ?>
</li>
	<li class="bbp-topic-freshness-author">
		<?php 
        do_action('bbp_theme_before_topic_author');
        ?>
		<?php 
        if (!empty($author_link)) {
            printf(__('by %s', 'ipt_kb'), $author_link);
        }
        ?>
		<?php 
        do_action('bbp_theme_after_topic_author');
        ?>
	</li>
</ul>
<?php 
        do_action('bbp_theme_after_forum_freshness_link');
        ?>
	<?php 
    }
コード例 #2
0
?>
</li>

	<li class="bbp-forum-reply-count"><?php 
bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count();
?>
</li>

	<li class="bbp-forum-freshness">

		<?php 
do_action('bbp_theme_before_forum_freshness_link');
?>

		<?php 
bbp_forum_freshness_link();
?>

		<?php 
do_action('bbp_theme_after_forum_freshness_link');
?>

		<p class="bbp-topic-meta">

			<?php 
do_action('bbp_theme_before_topic_author');
?>

			<span class="bbp-topic-freshness-author"><?php 
bbp_author_link(array('post_id' => bbp_get_forum_last_active_id()));
?>
コード例 #3
0
function td_show_forum($forum_object)
{
    $last_active = bbp_get_forum_last_active_id($forum_object->ID);
    $time_since = '';
    $last_updated_by_avatar = '';
    if (!empty($last_active)) {
        $time_since = bbp_get_forum_freshness_link($forum_object->ID);
        $last_updated_by_avatar = bbp_get_author_link(array('post_id' => $last_active, 'size' => 40, 'type' => 'avatar'));
        //echo $time_since;
    }
    ?>
    <div class="clearfix"></div>
    <ul class="td-forum-list-table td-forum-content">
        <li class="td-forum-category-title<?php 
    if (empty($forum_object->post_content)) {
        echo ' td-forum-title-no-desc';
    }
    ?>
">
            <div class="td-forum-index-padd">
                <a class="bbp-forum-title" href="<?php 
    bbp_forum_permalink($forum_object->ID);
    ?>
"><?php 
    bbp_forum_title($forum_object->ID);
    ?>
</a>
                <?php 
    if (!empty($forum_object->post_content)) {
        ?>
                    <div class="td-forum-description"><?php 
        echo $forum_object->post_content;
        ?>
</div>
                <?php 
    }
    ?>

                </li><li class="td-forum-replies">
                    <div><?php 
    echo bbp_get_forum_topic_count($forum_object->ID);
    ?>
 topics</div>
                    <div><?php 
    echo bbp_get_forum_reply_count($forum_object->ID);
    ?>
 replies</div>
                </li><li class="td-forum-last-comment">

                <div>
                    <?php 
    echo $last_updated_by_avatar;
    ?>
                </div>



                <div class="td-forum-last-comment-content">
                    <div class="td-forum-author-name">
                        by <a class="td-forum-last-author" href="<?php 
    bbp_reply_author_url($last_active);
    ?>
"><?php 
    echo bbp_get_topic_author_display_name($last_active);
    ?>
</a>
                    </div>
                    <div class="td-forum-time-comment">
                        <?php 
    bbp_forum_freshness_link($forum_object->ID);
    ?>
                    </div>
                </div>
        </li>
    </ul>
    <div class="clearfix"></div>
    <?php 
}