2017-08-27, 10:47 PM
How to display {$stats['numposts']}, {$stats ['numusers']}, {$stats ['numthreads']}, and {$newestmember} in the footer? I've tried to add the following syntax to global.php but it can not work.
#bump
// Build the forum statistics to show on the footer page.
$forumstats = '';
if($mybb->settings['showindexstats'] != 0)
{
// First, load the stats cache.
$stats = $cache->read('stats');
// Check who's the newest member.
if(!$stats['lastusername'])
{
$newestmember = $lang->nobody;;
}
else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
}
// Format the stats language.
$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
$lang->stats_numusers = $lang->sprintf($lang->stats_numusers, my_number_format($stats['numusers']));
$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);
eval('$forumstats = "'.$templates->get('global_start').'";');
}
#bump