Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How Do I Do This?


robbert12
Member

@robbert12

Sorry to bump this topic, but I’m new to BBpress and after a long search on Google and in these forums, I arrived here.

I want to do the same as on this picture: this picture.

Unfortunately, I can’t get it to work on my forum. I posted the code of front-page.php below and emphasized the problem point (I think). I hope somebody can help me

<?php bb_get_header(); ?>

<div id="forums"><!-- Forums -->
<?php if ( $forums ) : ?>
<div id="sidebar"><!-- Sidebar -->

<?php if ( bb_forums() ) : ?>
<table id="forumlist">
<thead>
<tr>
<th class="title"><?php _e('Forums'); ?></th>
<!-- th><?php _e('Topics'); ?></th-->
<th><?php _e('Posts'); ?></th>
</tr>
</thead>

<tbody>
<?php while ( bb_forum() ) : ?>
<tr<?php bb_forum_class(); ?>>
<td class="title"><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a> <span><?php forum_description(); ?></span><?php bb_forum_pad( '</div>' ); ?></td>
<!--td><?php forum_topics(); ?></td-->
<td><?php forum_posts(); ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php endif; // bb_forums() ?>

<?php if ( bb_is_user_logged_in() ) : ?>
<h2><?php _e('Views'); ?></h2>
<div class="sbox">
<ul id="views">
<?php foreach ( bb_get_views() as $the_view => $title ) : ?>
<li class="view"><a>"><?php view_name( $the_view ); ?></a>
<?php endforeach; ?>

</div>
<?php endif; // bb_is_user_logged_in() ?>

</div><!-- //sb -->

<div id="content"><!-- Content -->
<?php if ( $topics || $super_stickies ) : ?>
<table id="sticky">

<thead>
<tr>
<th class="title"><?php _e('Sticky'); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
</thead>

<tbody>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td class="title"><?php bb_topic_labels(); ?> <big><a>"><?php topic_title(); ?></a></big></td>
<td><?php topic_posts(); ?></td>

<td><a>"><?php topic_time(); ?></a></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td class="title">Er zijn geen belangrijke berichten beschikbaar</td>
<td></td>
<td></td>
</tr>

</tbody>
</table>
<?php endif; ?>

<table id="lastest">
<thead>
<tr>
<th class="title"><?php _e('Latest Discussions'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
</thead>

<tbody>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td class="title"><?php bb_topic_labels(); ?> <a>"><?php topic_title(); ?></a></td>
<td><?php topic_posts(); ?></td>
<td><a>"><?php topic_time(); ?></a></td>
</tr>
<?php endforeach; endif; // $topics ?>
</tbody>
</table>
<?php endif; // $topics or $super_stickies ?>
</div><!-- //c -->
<?php else : // $forums ?>

<?php post_form(); endif; // $forums ?>

</div><!-- //f -->

<?php bb_get_footer(); ?>

And this piece of code is wrong, I think;

<table id="forumlist">
<thead>
<tr>
<th class="title"><?php _e('Forums'); ?></th>
<!-- th><?php _e('Topics'); ?></th-->
<th><?php _e('Posts'); ?></th>
</tr>
</thead>

<tbody>
<?php while ( bb_forum() ) : ?>
<tr<?php bb_forum_class(); ?>>
<td class="title"><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a> <span><?php forum_description(); ?></span><?php bb_forum_pad( '</div>' ); ?></td>
<!--td><?php forum_topics(); ?></td-->
<td><?php forum_posts(); ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>

I hope somebody can help me.

Thanks in advance..

Skip to toolbar