The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
What querys for # of threads and posts?
I want to put the number of threads and posts on the front of my site. I currently have something, but the numbers are off. I assume that it is because of deleted posts and threads. Below are the queries I am using.
Code:
SELECT COUNT(*) AS threads FROM thread SELECT COUNT(*) AS posts FROM post Threads: 477 Posts: 1,531 But on the forum index page at the bottom it shows: Threads: 463 Posts: 1,529 What are the queries that vBulletin uses to grab that information? I have been digging through the code but I can't seem to find them. I would like the numbers to match. |
#2
|
||||
|
||||
Quote:
|
#3
|
|||
|
|||
Ya, I am just not sure how to do that in the query.
|
#4
|
||||
|
||||
Quote:
|
#5
|
|||
|
|||
great. thanks. i will look there.
ok, so the bottom of index.php had exactly what i want. the # of threads, the # of pots, and the # of users. however, i copy/paste that code into my homepage and it all comes up as 0. i did print_r on the array and it was full of information, except it didn't have the thread or post info in it like the code says it should. here is what the top of my file looks like. PHP Code:
still no dice. i have looked at the different files that are included. on index.php and i have the same files included on my page. but the array on my page still doesn't contain the information that is on the index.php page. ok, so after digging through the code and seeing the query that gathers the info and stores it into an array, i ran the query myself and parsed it. still no dice. i end up with 0. it seems like the information being stored in the database doesn't contain the information. however the code on index.php says otherwise. so i am confused. |
#6
|
|||
|
|||
Quote:
|
#7
|
|||
|
|||
i found out the solution. if anyone wants to know it is in my last post in this thread.
https://vborg.vbsupport.ru/showthread.php?t=77916 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|