Info
- 2 posts
- 1 voice
- Started 5 years ago by wmarcy
- Latest reply from wmarcy
- This topic is resolved
bbRatings need help with the bb_top_topics() Function
-
- Posted 5 years ago #
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.
-
- Posted 5 years ago #
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' /> -
You must log in to post.