Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 2 Years, 6 Months, 1 Week ago Board Stats in Header not working
#1
Solved: 2 Years, 6 Months, 1 Week ago
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?
Hello I'm Wally, the administrator of Sharree.com
Reply
#2
Solved: 2 Years, 6 Months, 1 Week ago
they should work on the index template [below {$header}]
Reply
#3
Solved: 2 Years, 6 Months, 1 Week ago
(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.
Hello I'm Wally, the administrator of Sharree.com
Reply
#4
Solved: 2 Years, 6 Months, 1 Week ago
it would be better to use a plugin for your requirement. this plugin can be helpful ..
Reply
#5
Solved: 2 Years, 6 Months, 1 Week ago
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']); 
Hello I'm Wally, the administrator of Sharree.com
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)