The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
How is it possible to display a total counter (added counters from the single threads) in the start-page of vb?
Thanks for your hints! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
it already shows total posts in the forum. What else are you wanting?
|
|
#3
|
|||
|
|||
|
Martin,
i want to show the summarized views of all threads in the forum page - near by posts/threads/new member ... |
|
#4
|
|||
|
|||
|
Like "This forum has been viewed this # of times"?
So just a total of all views? |
|
#5
|
|||
|
|||
|
Yep - simply this!
|
|
#6
|
|||
|
|||
|
now I understand what you're wanting
![]() I think it's doable, though I have spent any time thinking about it. |
|
#7
|
|||
|
|||
|
Try adding some code like this to the index.php file at about line 80:
Code:
$countviews=$DB_site->query_first("SELECT SUM(views) AS views FROM thread");
$totalviews=$countviews[views];
if ($totalviews=="") {
$totalviews=0;
}
John |
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
|||
|
|||
|
I believe he answered that in your quote above?
Quote:
|
|
#10
|
|||
|
|||
|
Quote:
![]() In the table thread is a field called views used, why not adding something like a "global views" in the database, and everytime the field views of any thread is incremented - the "global views" would be incremented too! If we use "global views" instead of a manual counting in index.php it would'nt be quite server intensive. |
![]() |
|
|