Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 2 Years, 2 Months ago Display Statistic In Footer?
#1
Solved: 2 Years, 2 Months ago
How to display {$stats['numposts']}, {$stats ['numusers']}, {$stats ['numthreads']}, and {$newestmember} in the footer? I've tried to add the following syntax to global.php but it can not work.

// Build the forum statistics to show on the footer page.
$forumstats = '';
if($mybb->settings['showindexstats'] != 0)
{
	// First, load the stats cache.
	$stats = $cache->read('stats');

	// Check who's the newest member.
	if(!$stats['lastusername'])
	{
		$newestmember = $lang->nobody;;
	}
	else
	{
		$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
	}

	// Format the stats language.
	$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
	$lang->stats_numusers = $lang->sprintf($lang->stats_numusers, my_number_format($stats['numusers']));
	$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);

	eval('$forumstats = "'.$templates->get('global_start').'";');
}

#bump


Attached Files Thumbnail(s)
   
Reply
#2
Solved: 2 Years, 2 Months ago
#bump
Reply
#3
Solved: 2 Years, 2 Months ago
Does this still work?
Do NOT PM me for support unless I ask you on your support thread.
Reply
#4
Solved: 2 Years, 2 Months ago
(09-09-2017, 07:06 PM)Dead-i Wrote: Does this still work?

I have not got the solution yet.
Reply
#5
Solved: 2 Years, 2 Months ago
Solved try this.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)