![]() |
total thread views
what is the code i would add into my stats panel to have the total thread views info please.
|
bump
|
i would like this too! Kinda like what they have here at VB.org
|
open index.php
find: PHP Code:
PHP Code:
|
I got errors when I used the code. I fixed it with this...
$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']); ..."number_format(" doesn't show up under the PHP vB Code statement. |
Would this add an extra query to forumhome?
|
Quote:
|
The "$DB_site->query" was there already... the line wasn't added, only changed.
|
Quote:
|
even so it's a slow query, which will slow down loading forumhome a bit.
i'm not a fan of threadviews on forumhome because it isn't really usefull and just slows down the page.... |
All times are GMT. The time now is 12:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|