Log in

View Full Version : total page views


Mijae
04-13-2003, 03:25 PM
How to show total page views on forumhome? And if possible, without adding an extra query so it would work just like a total thread views


$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads, SUM(views) AS views FROM thread');
$totalthreads=number_format($countthreads['threads']);
$totalviews=number_format($countthreads['views']);

Xenon
04-13-2003, 03:52 PM
just threadviews are saved in the DB, not the pageviews (hits)

so it's not possible without a hack which stores every hit in the db, too (i think vBstats does that)

but you can't get the past pageviews through that.

Mijae
04-13-2003, 04:13 PM
I have the vbstats installed, but its a very long code to copy and paste into index.php, several queries :P

Xenon
04-13-2003, 06:19 PM
you just have to copy the part with pageviews, not the whole code ;)

Mijae
04-13-2003, 06:40 PM
Thats what I mean, the code part of the pageviews is rather long...