The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#5
|
|||
|
|||
![]()
Perfect! Thank you very much. For anyone also wishing to do the same,
HERE IS THE FINAL WORKING CODE: File: 'forumStats.php' - saved in the root directory of my forum Code:
<?php $specialtemplates = array('userstats'); require_once('./global.php'); cache_ordered_forums(1, 1); $numbermembers = vb_number_format($vbulletin->userstats['numbermembers']); echo 'Members: '; 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 ' Thread: '; echo $totalthreads; echo ' Posts: '; echo $totalposts; ?> However (there's always a but, right), when I add this as an include on my website homepage (running wordpress) I get an error. I have placed the following line into my template: PHP Code:
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|