The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
if i want to count forum's total posts views~~
what should i do?? |
#2
|
||||
|
||||
Try:
$forumviews = $DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread WHERE forumid='X'"); $totalviews = number_format($forumviews[threadviews]); Replace the red X with the forum ID number you are interested in. |
#3
|
||||
|
||||
thankz~~~
but if i want to count all forums~~ what should i do?? |
#4
|
||||
|
||||
Sorry, I misunderstood your question. Use this hack:
https://vborg.vbsupport.ru/showthrea...otal+and+views |
#5
|
||||
|
||||
i already use that hack but it look so strange!!
ex:thread:107 and thread views also 107~~~ it didn't count post's views if want to count post too what should i do?? and my english not good enough,i'm sorry about that!! |
#6
|
||||
|
||||
You're doing something wrong. The number of threads and views should not be the same unless each thread was only viewed once. You need to add the hack code toward the top of index.php and then have something like this:
Total Threads: <b>$totalthreads</b> | Total Thread Views: <b>$totalviews</b> in your forumhome template. You will not get the same values for both. |
#7
|
||||
|
||||
haha~~~~~
ur right~~~!! i'm really do something wrong with that code!! thankz again~~~~ |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|