Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sub Forums


  • aspen102
    Member

    @aspen102

    Example:

    Let’s say front-page.php lists 3 categories

    Fruits

    Veggies

    Meats

    If you were to click on Fruits; I’d like the next page to show the subforums of that parent excluding veggies, & meats forums. Any comments appreciated.

    Basically, I want categories with sub-forums but in a format/structure that you would find in phpbb where subforums are cleanly kept on the next page. Why? Because showing everything in one location can get a bit messy. Especially with subforums.

    I have searched through the bbpress forum for this and was able to get the following to work related to the front-page.php portion. Now I just need to get the 2nd page to show the children of the category. Currently it isn’t doing that.

    *****front-page.php which works in only displaying the categories****************

    <?php foreach( $forums as $forum ) : if( !$forum->forum_parent ) { ?>

    <tr<?php alt_class(‘forum’); ?>>

    <td>“><?php forum_name(); ?> <small><?php forum_description(); ?></small></td>

    <td class=”num”><?php forum_topics(); ?></td>

    <td class=”num”><?php forum_posts(); ?></td>

    </tr>

    <?php } endforeach; ?>


    Now I would like the child accounts to show up in forum.php

    Any suggestions? Or where I could look? Once you click on the parent forum it just takes you to that category forum.php page, with no children. i need the children to show up but only for that parent.

    *****forum.php which I need to show the children*********************

    <?php bb_get_header(); ?>

    <?php if ( is_bb_profile() ) profile_menu(); ?>

    <?php login_form(); ?>

    <div id=”main”>

    <div id=”forums”>

    <h3 class=”bbcrumb”>“><?php bb_option(‘name’); ?> » <?php forum_name(); ?></h3>

    <?php if ( $topics || $stickies ) : ?>

    <table id=”latest”>

    <tr>

    <th><?php _e(‘Topic’); ?> — <?php new_topic(); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    <th><?php _e(‘Last Poster’); ?></th>

    <th><?php _e(‘Freshness’); ?></th>

    </tr>

    <?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>

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

    <td><?php _e(‘Sticky:’); ?> <big>“><?php topic_title(); ?></big></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”><small><?php topic_time(); ?></small></td>

    </tr>

    <?php endforeach; endif; ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>

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

    <td>“><?php topic_title(); ?></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”><small><?php topic_time(); ?></small></td>

    </tr>

    <?php endforeach; endif; ?>

    </table>

    <p>“><?php _e(‘RSS feed for this forum’); ?></p>

    <div class=”nav”>

    <?php forum_pages(); ?>

    </div>

    <?php endif; ?>

    <?php post_form(); ?>

    </div>

    </div>

    <?php bb_get_footer(); ?>

    </div>

    ******************************************************************************

    Thank You –

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.