The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#3
|
|||
|
|||
![]()
What an incredibly helpful answer, thanks you! So I have the following working code, that gives me the total number of members:
Code:
<?php $specialtemplates = array('userstats'); require_once('./global.php'); $numbermembers = vb_number_format($vbulletin->userstats['numbermembers']); echo $numbermembers; ?> However, I also want to add in the total number of posts and threads, so I tried the below: Code:
<?php $specialtemplates = array('userstats'); $specialtemplates = array('forumcache'); require_once('./global.php'); $numbermembers = vb_number_format($vbulletin->userstats['numbermembers']); echo $numbermembers; $totalthreads = 0; $totalposts = 0; if (is_array($vbulletin->forumcache)){ foreach ($vbulletin->forumcache AS $forum) { $totalthreads += $forum['threadcount']; $totalposts += $forum['replycount']; } } $totalthreads = vb_number_format($totalthreads); $totalposts = vb_number_format($totalposts); echo $totalthreads; echo $totalposts; ?> Thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|