MyBB Community Forums

Full Version: Number Stats On Header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi mybb.. I want ask you again Big Grin how to put Stats only Total Post and Total User in header. So in may page stats always in header.
you know like this

TOTAL USER
2330

TOTAL POST
574.101

Please help me.. If need plugin or modification post here Big Grin
ACP > Templates > Header Templates > header_welcomeblock_member > and find;
{$lang->welcome_pms_usage}
and add the following code just After that;
 | <span style="font-size: 11px;">Total Users: {$total_users} - Total Posts: {$total_posts}</span>
Save the template.

Now open ./global.php and find;
$plugins->run_hooks("global_start");
and add the following code just Below that;
$stats = $cache->read("stats");
$total_posts = my_number_format($stats['numposts']);
$total_users = my_number_format($stats['numusers']);
Save the file.

Now you'll get like the following;
[attachment=23209]
(2011-06-28, 04:56 PM)Yaldaram Wrote: [ -> ]ACP > Templates > Header Templates > header_welcomeblock_member > and find;
{$lang->welcome_pms_usage}
and add the following code just After that;
 | <span style="font-size: 11px;">Total Users: {$total_users} - Total Posts: {$total_posts}</span>
Save the template.

Now open ./global.php and find;
$plugins->run_hooks("global_start");
and add the following code just Below that;
$stats = $cache->read("stats");
$total_posts = my_number_format($stats['numposts']);
$total_users = my_number_format($stats['numusers']);
Save the file.

Now you'll get like the following;

Wow thanks you're the best. Mark as solved
No problem =)