MyBB Community Forums

Full Version: Board Stats in Header not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys. I'm using the latest MyBB release 1.8.11 and basic board stats on the header don't seem to work.

I'm trying to add board stats in my header such as:
{$stats['numposts']}
{$stats['numusers']}
etc.

However they don't seem to work in the new version but did work in the previous one I used. Is there a file I need to edit in my directory to make them appear globally?
they should work on the index template [below {$header}]
(05-04-2017, 02:50 PM).m. Wrote: [ -> ]they should work on the index template [below {$header}]

Ya it looks like it's working on index however I wanted to use it gloabally and have it appear in the header block. Is there a file I need to edit to make it global, not only index.
it would be better to use a plugin for your requirement. this plugin can be helpful ..
Got it .m. instead of the plugin I edited the the global.php file and under the $plugin hook I added

$stats = $cache->read("stats");
$total_users = my_number_format($stats['numusers']);