Solved: 4 Years, 5 Months, 2 Weeks ago Board Stats in Header not working
#1
Solved: 4 Years, 5 Months, 2 Weeks 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?
Name's Waleed, I'm a graphic and web design (2015) graduate from Canada. Self-employed and lending my design skills to the MyBB community.
Reply
#2
Solved: 4 Years, 5 Months, 2 Weeks ago
they should work on the index template [below {$header}]
Reply
#3
Solved: 4 Years, 5 Months, 2 Weeks ago
(2017-05-04, 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.
Name's Waleed, I'm a graphic and web design (2015) graduate from Canada. Self-employed and lending my design skills to the MyBB community.
Reply
#4
Solved: 4 Years, 5 Months, 2 Weeks ago
it would be better to use a plugin for your requirement. this plugin can be helpful ..
Reply
#5
Solved: 4 Years, 5 Months, 2 Weeks 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']); 
Name's Waleed, I'm a graphic and web design (2015) graduate from Canada. Self-employed and lending my design skills to the MyBB community.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)