Now if I want the stats to show in a template, without creating a php file, I create a new plugin and add this:
Code:
// ### BOARD STATISTICS #################################################
// get total threads & posts from the forumcache
$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);
// get total members and newest member from template
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
$newuserinfo = array(
'userid' => $vbulletin->userstats['newuserid'],
'username' => $vbulletin->userstats['newusername']
);
$activemembers = vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;
$ad_location['board_after_forums'] = vB_Template::create('ad_board_after_forums')->render();
$ad_location['board_below_whats_going_on'] = vB_Template::create('ad_board_below_whats_going_on')->render();
// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######
$templater = vB_Template::create('footer');
$templater->register_page_templates();
$templater->register('activemembers', $activemembers);
$templater->register('activeusers', $activeusers);
$templater->register('forumbits', $forumbits);
$templater->register('newuserinfo', $newuserinfo);
$templater->register('numberguest', $numberguest);
$templater->register('numbermembers', $numbermembers);
$templater->register('numberregistered', $numberregistered);
$templater->register('totalonline', $totalonline);
$templater->register('totalposts', $totalposts);
$templater->register('totalthreads', $totalthreads);
$templater->register('wgo_members',$wgo_members);
$templater->register('wgo_members_list',$wgo_members_list);
print_output($templater->render());
When I navigate to /forum, I get the footer ONLY and the stats. forumhome is gone lol
I followed your step to create a custom vb:raw xxx but that only display just text. I need it to execute php scripts:
https://vborg.vbsupport.ru/showthread.php?t=282796