Average members online statistics

Started by Reefer, January 12, 2011, 02:14:37 AM

Previous topic - Next topic

Reefer

Wonder of someone can help me here... have searched far and wide to no avail.

Running RC2.3, Default theme...

In the Statistcs centre "Average online per day:" - displays the average number of users online each day - this is the maximum number of users logged on at any one time. I would like this number to display the average Total number of users logged in during a day.

Also, the "Most online" stat displays the maximum number of users logged in at any one time... would like this to display the maximum total number of users logged per day.

I installed the Mod "Users logged in today", which lists the number of users logged in over a day - this number is 4x the numbers listed in the stats above... can anyone offer some help?

Tx in advance.

Illori

you might want to create a mod request for this as it is not a default feature. it also may slow down your forum a bit.

Reefer

Can you move this topic to Mod requests, or must I repost there?

Joker™

Quote from: Reefer on January 12, 2011, 02:14:37 AM
Wonder of someone can help me here... have searched far and wide to no avail.

Running RC2.3, Default theme...

In the Statistcs centre "Average online per day:" - displays the average number of users online each day - this is the maximum number of users logged on at any one time. I would like this number to display the average Total number of users logged in during a day.

Also, the "Most online" stat displays the maximum number of users logged in at any one time... would like this to display the maximum total number of users logged per day.

I installed the Mod "Users logged in today", which lists the number of users logged in over a day - this number is 4x the numbers listed in the stats above... can anyone offer some help?

Tx in advance.
So in easy words you want the number shown by the mod in your stats also?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Reefer

Quote from: Joker™ on February 09, 2011, 08:56:35 AM
Quote from: Reefer on January 12, 2011, 02:14:37 AM
Wonder of someone can help me here... have searched far and wide to no avail.

Running RC2.3, Default theme...

In the Statistcs centre "Average online per day:" - displays the average number of users online each day - this is the maximum number of users logged on at any one time. I would like this number to display the average Total number of users logged in during a day.

Also, the "Most online" stat displays the maximum number of users logged in at any one time... would like this to display the maximum total number of users logged per day.

I installed the Mod "Users logged in today", which lists the number of users logged in over a day - this number is 4x the numbers listed in the stats above... can anyone offer some help?

Tx in advance.
So in easy words you want the number shown by the mod in your stats also?

Yup that would do it.

Joker™

Sorry for getting on replying here late :P,

try these edits (Make backup of files before editing them)

Go to

Sources\Stats.php

Find:
// Format the numbers nicely.

Add before:
// Get the user online today list.
require_once($sourcedir . '/Subs-MembersOnlineToday.php');
$membersOnlineTodayOptions = array(
'sort' => 'login_time',
'reverse_sort' => true,
'period' => 'current_day',
'canview' => 'registered',
);
$context += getMembersOnlineTodayStats($membersOnlineTodayOptions);



Themes\default\Stats.template.php

Find:
<dd>', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '</dd>

Replace it with:
<dd>', $context['num_users_online_today'], ' - ', $context['most_members_online']['date'], '</dd>


Themes\<them you are using>\BoardIndex.template.php (if it's not here edit the one in Default theme)

Find:
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.



Replace it with:
', $txt['most_online_today'], ': <strong>', $context['num_users_online_today'], '</strong>.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Reefer

Thanks Joker. Will give it a bash this weekend...

Joker™

Do reply here, about how well the code worked :P.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Reefer

Sorry for the late reply,.
Sad to report I get the following:

Fatal error: require_once() [function.require]: Failed opening required '/Subs-MembersOnlineToday.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/www/users/ultimaqz/Sources/Stats.php on line 158

Advertisement: