Posts: 695
Threads: 91
Joined: Nov 2014
Reputation:
34
2017-09-09, 07:15 PM
(This post was last modified: 2017-09-10, 03:19 PM by Livewire.)
Any ideas how I can display {$stats ['numposts']}, {$stats ['numusers']}, {$stats ['numthreads']}, and {$newestmember} in the footer please?
I've tried adding them manually but it doesn't work.. I've seen most forums have this feature I'm wondering is it a plugin or..?
Bump anybody?
Do NOT PM me for support unless I ask you on your support thread.
Posts: 695
Threads: 91
Joined: Nov 2014
Reputation:
34
2017-09-10, 11:37 PM
(2017-09-10, 10:29 PM)Michael2014 Wrote: Try this:
Open ./global.php and find:
$plugins->run_hooks("global_start");
and add the following code just Below that..
$stats = $cache->read("stats");
$stats['newest_user'] = build_profile_link($stats['lastusername'], $stats['lastuid']);
$total_posts = my_number_format($stats['numposts']);
$total_users = my_number_format($stats['numusers']);
Stats vars will work globally now..
You are welcome.
Tried that and I got an error..
A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support.
Do NOT PM me for support unless I ask you on your support thread.
Posts: 695
Threads: 91
Joined: Nov 2014
Reputation:
34
2017-09-11, 05:49 PM
(2017-09-11, 02:52 AM)Pulseeey Wrote: (2017-09-11, 12:53 AM)Michael2014 Wrote: That is nothing, that just has to do with your vars, if you are using the vars above then you NEED to remove the spacing within them,
a mis-written var triggers the above error, try these vars below with the spacing removed.
{$stats['numposts']} {$stats['numusers']} {$stats['numthreads']} and {$newestmember}
{$newestmember} not display.
Yeah newest member not working..
Do NOT PM me for support unless I ask you on your support thread.
Posts: 695
Threads: 91
Joined: Nov 2014
Reputation:
34
2017-09-12, 05:08 PM
Thank you finally it works!
Do NOT PM me for support unless I ask you on your support thread.