Forums

Join
bbPress Support ForumsThemesAdd a "last poster" column in the listing of forums

Info

Tags

Add a "last poster" column in the listing of forums

  1. Hello, i try this in front-page.php:

    <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"><?php topic_last_poster(); ?>, il y a "><?php topic_time(); ?></td>
    </tr>

    but the "><?php topic_time(); ?> show me all time the date of the first post, in all the forum themes ... Why?

    bye

  2. topic_time is meant to be used in topic loop, not a forum loop so it doesn't know the last topic id.

    You could get around this by passing the last topic id in the topic_time however you'd have to do a custom query to determine the last topic in a forum, as it's not stored/available by default.

    I think I'm going to make this into a plugin "forum_last_poster"

    update: I seem to have finally made it work!

  3. I've now made this into a full plugin:
    http://bbpress.org/plugins/topic/forum-last-poster/

    Once you install it, you'll be able to use your code above, but change the part of the function that says topic to forum, ie. forum_time()

  4. You must log in to post.