bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Looking for help with bb-ratings

(6 posts)
  • Started 1 year ago by actorjiml
  • Latest reply from wmarcy
  • This topic is resolved
  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.

    Posted 1 year ago #
  2. Try

    $topics = bb_top_topics();

    as your first line.

    Posted 1 year ago #
  3. D'oh! Works like a charm.

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

    Thanks so much.

    Posted 1 year ago #
  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 ;)

    Posted 1 year ago #
  5. Glad it works :)

    Posted 1 year ago #
  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!

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.