Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbRatings need help with the bb_top_topics() Function

  • Here is what I have in my front-page.php:

    <h2><?php _e('Hightest Ratings'); ?></h2>
    <table id="highest">
    <tr>
    <th><?php _e('Highest Rated Topics'); ?></th>
    <th><?php _e('Rating'); ?></th>
    <th><?php _e('#'); ?></th>
    </tr>

    <?php $topics = bb_top_topics(); ?>
    <?php foreach ($topics as $topic); ?>
    <tr<?php alt_class('forum'); ?>>
    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>

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

    </table>

    This code is only showing the first topic it comes across with a rating.

    See what I am talking about at: http://www.wetworx.com/forums/

    Any help would be appreciated.

Viewing 1 replies (of 1 total)
  • Jim Lynch came to the rescue, here is what is necessary:

    This code gos into the front-page.php file:

    <table id="highest">
    <tr>
    <th>Highest Rating</th>
    <th>Rating</th>

    </tr>

    <?php $topics=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(); ?>
    </span>
    </div>
    </td></tr>
    <?php endforeach; ?>
    </table>

    Also very important not to forget to include “my-plugins/bb-ratings.css” in your template header file. That should look something like this:

    <link rel='stylesheet' href='http://YOUR_PATH_TO_BBPRESS/my-plugins/bb-ratings.css' type='text/css' />

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