hentdan (@hentdan)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • In reply to: Hiding Sub-Forums

    This works for me…

    function bb_forum_depth( ) {

    global $bb_forums_loop;

    if ( !is_object($bb_forums_loop) || !is_a($bb_forums_loop, 'BB_Loop') )

    return false;

    return $bb_forums_loop->walker->depth;

    }

    <?php while ( bb_forum() ) : ?>

    <?php if (bb_get_forum_is_category()) : ?>

    <tr<?php bb_forum_class('bb-category'); ?>>

    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?>"><?php forum_name(); ?><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>

    </tr>

    <?php continue; endif; ?>

    <?php if (bb_forum_depth() <= 2 ) : ?> <!-- ******* -->

    <tr<?php bb_forum_class(); ?>>

    <td><?php bb_forum_pad( '<div class="nest">' ); ?>"><?php forum_name(); ?><?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; ?><!-- ******* -->

    <?php endwhile; ?>

Viewing 1 replies (of 1 total)