Skip to:
Content
Pages
Categories
Search
Top
Bottom

Last Post Data

  • I am a beginner with a beginner question: On the front page in the “Latest Discussions” section, there are columns for Last Poster and Freshness. However, in the “Forums” section, there are no such columns.

    I would like to add this information in the “Forums” section as well (and then eventually delete the “Latest Discussions” section). I have added the two column headers (actually combined into one column that has both pieces of info in it), but I have no idea how to get the correct data (which I want to search all the topics from within each forum and pull the latest poster and time details).

    The code I currently have is below (for the site http://heathoops.net/forums). It’s formatted how I want it, but I have no idea what post data it is pulling (I want it to pull the latest post from any topic within each forum)… Can anyone help?

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

    <h2><?php _e(‘Forums’); ?></h2>

    <table id=”forumlist”>

    <tr>

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

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

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

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

    </tr>

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

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

    <td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><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>

    <td class=”num”>by “><?php topic_last_poster(); ?>
    on <?php echo date(“D M j, Y g:i a”, strtotime($topic->topic_time)); ?></br></td>

    </tr>

  • You must be logged in to reply to this topic.
Skip to toolbar