Not Solved Adding BoardStats into the footer
#1
Not Solved
Is it possible to allow the board stats variable, or one that does somewhat similar to that in the footer template?

I'm creating and theme and want the footer to be like this: http://speedcap.net/sharing/files/a0/74/...8fd965.png

Is this possible?
Reply
#2
Not Solved
{$stats['numposts']} Posts
{$stats['numthreads']} Threads
{$stats['numusers']} Members
{$newestmember} or {$stats['lastusername']} Newest Member
{$mostonline['numusers']} Most Online at {$recorddate}
Reply
#3
Not Solved
Tried them, they don't work. /:
Reply
#4
Not Solved
Missed that it should be for footer, those work only on index. There is no way to put them (or any other) globally without a plugin/core modification.

You can add something like that to global.php, below $navbits[0]['url'] for example:
$footer_stats = $cache->read("stats");
	
if(!$footer_stats['lastusername'])
{
	$footer_newestmember = "no-one";
}
	else
{
	$footer_newestmember = build_profile_link($footer_stats['lastusername'], $footer_stats['lastuid']);
}

$footer_mostonline = $cache->read("mostonline");
$footer_recorddate = my_date($mybb->settings['dateformat'], $footer_mostonline['time']);
$footer_recordtime = my_date($mybb->settings['timeformat'], $footer_mostonline['time']);

Then use {$footer_stats['lastusername']}, {$footer_recorddate}, {$footer_stats['numusers']}, {$footer_stats['numthreads']} etc. Tested and works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)