Forums

Join
bbPress Support ForumsPluginsLooking for help with bb-ratings

Info

Looking for help with bb-ratings

  1. 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.

  2. Try

    $topics = bb_top_topics();

    as your first line.

  3. D'oh! Works like a charm.

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

    Thanks so much.

  4. 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 ;)

  5. Glad it works :)

  6. 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!

  7. You must log in to post.