Kier, he wants total views not posts but think it will be based on posts, which it will not

because views are stored in the thread table so you would have to add all the views for every thread together.
PHP Code:
$forumviews = $DB_site->query_first("
SELECT views
FROM thread
WHERE threadid > 0);
while ($forumviews2 = mysql_fetch_array($forumviews)) {
$threadviews = $forumviews2["views"];
$totalviews = $totalviews+ $threadviews;
}
Now:
i) i think that will work but i have not tested it
ii) i would also think it is quite server intensive as it has to go through every single thread to count up. I can't see any other way of doing it bar having a counter increase every time a thread is viewed at the same time the thread count is increased. That would be possible and perhaps less server intensive in the end.
iii) if it does not work tell me, someone will probably post glaring errors.