Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Topic Icons Default Icon (Advanced request)


Olaf Lederer
Participant

@finalwebsites

Hi,

you mean like on my frontpage (check the link from my profile)

I use this code:

<?php while ( bb_forum() ) :
if (get_forum_parent_id() == 0) : ?>
<?php if (bb_get_forum_is_category()) : ?>
<tr<?php bb_forum_class('bb-category'); ?>>
<td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
</tr>
<?php continue; endif; ?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php
endif;
endwhile; ?>

The function get_forum_parent_id() is located in my personal plugin file:

function get_forum_parent_id( $forum_id = 0 ) {
$forum = get_forum( get_forum_id( $forum_id ) );
return apply_filters( 'get_forum_parent_id', $forum->forum_parent, $forum->forum_id );
}

Skip to toolbar