Skip to:
Content
Pages
Categories
Search
Top
Bottom

Looking for help with bb-ratings

  • @actorjiml

    Participant

    I am looking for some help with the plugin bb-ratings. Specifically the functions bb_top_topics. From what I gather it returns an array of topics in descending order of the votes the topics have received. I took that information and put the following in my front page template: <?php bb_top_topics();

    foreach ($topics as $topic) : ?>

    <tr<?php alt_class('forum'); ?>>

    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>

    </td>

    <td class="num"><div class="rating-holder"><?php bb_rating();?>

    <span class="count"><?php bb_rating_count(); ?>

    The problem is that it does not display the topics in descending order, it just displays all of the most recent in the order they were entered.

    I know the plugin page (bbpress.org/plugins/) has this function working as it should be.

    Thanks in advance for any help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • @mdawaffe

    Member

    Try

    $topics = bb_top_topics();

    as your first line.

    @actorjiml

    Participant

    D’oh! Works like a charm.

    Just goes to show that you can look at something too hard.

    Thanks so much.

    @ardentfrost

    Member

    Same thing happened to me in one of mine. I was using get_header instead of bb_get_header. Silly mistakes are the worst when you need help finding them ;)

    @mdawaffe

    Member

    Glad it works :)

    @wmarcy

    Member

    Any chance we can get a chunk of functioning code to implement bb_top_topics()

    (the code in the first message and subsequent messages are not working for me…)

    I have been playing with it for better pat of a day and no go.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar