see if this works. I stole it from a different hack that FireFly cleaned up and it seemed like it would work here too.
everything is new, so delete the old code
right above this
PHP Code:
// Start makeforumbit
add this
PHP Code:
$getforumviews = $DB_site->query('
SELECT sum(views) AS hits, forumid
FROM thread
GROUP BY forumid
');
$forumviews = array();
while ($getforumview = $DB_site->fetch_array($getforumviews)) {
$forumviews[$getforumview['forumid']] = $getforumview['hits'];
}
then right above this
PHP Code:
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
add this
PHP Code:
global $forumviews;
$forumhits = $forumviews[$forum['forumid']];
if (intval($forumhits) < 1) {
$forumhits = 0;
}
now add the var $forumhits where you want the number of total views per forum to appear. this should only add 1 querry regardless of the number of forums.
once my server is back up, I'll be installing this.