The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
$forumcache question
i'm trying to get the total posts and threads to display on a non-vb page. i asked about that in this thread.
https://vborg.vbsupport.ru/showthread.php?t=77797 i was told to check out the bottom of index.php to see how it is retrieved for the forums. i looked, and used that code. however, it doesn't work. i always ended up with 0 for both. i have looked to make sure that i wasn't missing a file that should have been included. how come $forumcache contains threadcount and replycount when it is used in index.php and when i do print_r($forumcache); threadcount and replycount are missing from the information? there is all the other information, just not those 2...which happens to be the 2 i need. any ideas on why this is happening? i've searched both vB.com and vB.org but haven't found anything really relevant to this particular question. |
#2
|
|||
|
|||
Try adding a
PHP Code:
|
#3
|
|||
|
|||
PHP Code:
|
#4
|
|||
|
|||
Do you have a logged in user on that page?
If your forums are not open to guests, it would also pull a 0-postcount for all forums if not logged in. |
#5
|
|||
|
|||
ya, all forums are open for guests except for one. the reason they are coming up with 0 is because before i start to grab the info i set the 2 variables to 0. however, i don't think it matters if the forums are open to guests or not because it is just grabbing the stats from the forum. inside the $forumcache there is alot of information regarding each individual forum. it should contain that information no matter what your status is on the site. it should all be the same.
atleast that is what i assume from looking over the code. it's just weird that it works on index.php but the same exact code with the same included files doesn't work because those 2 pieces are missing from $forumcache. i figured it out. i got some help and i dug around in the code a bit and figured it all out. for anyone else that is curious. PHP Code:
|
#6
|
|||
|
|||
Thanks a lot.. i was looking for this!
Any idea how do i get the total number of members? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|