Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How Do I Do This?


livibetter
Member

@livibetter

You have to put the forum ids into this line (no need to put them all into this line, you can let big cities to be shown in front-page.php)

if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))

You can get those id in Forum Management by move mouse over Edit links.

Those ids should belongs to top-level forums.

New code (edited):

<?php
if ( bb_forums() ) :
global $bb_forums_loop;
$_loop =& $bb_forums_loop;
bb_forum();
$skipForum = false;
while ($_loop) :
if ($_loop->walker->depth == 1) {
if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))
$skipForum = true;
if ($skipForum) {
?>
<h2<?php bb_forum_class?>><a href="<?php forum_link(); ?>">Click Here To Go To the <?php forum_name(); ?> Forums</a></h2>
<?php
}
else {
?>
<h2<?php bb_forum_class?>><?php forum_name(); ?></h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php
}
}
elseif (!$skipForum) {
?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php
}
bb_forum();
if ($_loop === null || $_loop->walker->depth == 1) {
if (!$skipForum)
echo '</table>';
$skipForum = false;
}
endwhile; ?>
<?php endif; // bb_forums() ?>

Skip to toolbar