MyBB Community Forums

Full Version: Issue With Who's Online Today Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The readme says to add this code at the bottom of in/languages/english/index.lang.php:

<code>$l['online_note_today'] = "{1} {2} active in the past {3} hours ({4} {5}, {6} of whom {7} invisible, and {8} {9}).";
$l['whos_online_today'] = "Who has been online today";</code>

To upload onlinetoday.php to inc/plugins/ then to activate it from the ACP. That's exactly what I did, but that didn't add any Who's Online Today bit on my index page. What am I doing wrong?

For the record, I'm already running Advanced Stats plugin, if that can cause any interference with Who's Online Today's functionality.
I had this problem, here's how to sort it.

1) open the plugin file (notepad will do it) and find

$plugins->add_hook('index_end', 'add_onlinetoday', '1000000'); 

Change that to

$plugins->add_hook('index_start', 'add_onlinetoday', '1000000'); 

2) In the plugin find

$online_today = '';

Add above it

$lang->load("index");


3) Put {$online_today} into your index_boardstats under {$whosonline}

That should work no problem.
Thanks, mate. Smile
When does this reset the users visited?
Does it work off server time or should I make some kind of adjustment on the file?

It should work so that at midnight whatever time your server / host is located it will reset.

Does this not work like that?
Does it work on a 'when the member logged in or out basis? I think that would be too complicated to write.

The mod and fixes above work great other than I don't seem to know when it resets as the same users are there day after day and I know some of them have not been to the board yet.
I'm pretty sure it goes by the time the user logged out, and they will be in the list for 24 hours from that time. Since that is how mybb itself works, that makes the most sense.
Excellent! thank you.
Actually, it's somewhat easier to base it off the past 24 hours, rather than have some sort of reset functionality.
I can only ever seem to get this plugin to work with the default MyBB therme.
I have tried 3 other themes and can never seem to get this plugin to operate - even with making sure all the codign is correct.

Is that correct?
Wozzer Wrote:I can only ever seem to get this plugin to work with the default MyBB therme.
I have tried 3 other themes and can never seem to get this plugin to operate - even with making sure all the codign is correct.

Is that correct?

I had this same issue but nobody seemed to have a answer and so i just got rid of the theme. The problem is with the theme and not the plugin. Some of the themers never bother to check and see if the plugins all work. This is the only notable sore spot with this software which really isnt their fault. Hopefully 1.4 should help with this issue.
Thanks HarryWx - saves me from looking any further on it. Thought I was doing something wrong.
Pages: 1 2