Icewind Most Online [Deleted]

One of my counter did exceed the older value, let's say within the last two hours and no change.

The only way I can see that happening is just by timing... when the most online code grabbed the session data, maybe at that time a visitor disappeared? Not really sure, but I do know that sometimes XenForo's online counts can be off by one and you have to refresh to get the actual number of visitors. That is normal behavior because of when the session data is saved, I believe.

Only when exceeded not tied?

Only when exceeded. I could modify it to update a new date when the old value = the new value. The reason I didn't add that is because on smaller boards, the tie value may be set a lot, so that would mean a lot of writes to the registry.
 
The only way I can see that happening is just by timing... when the most online code grabbed the session data, maybe at that time a visitor disappeared? Not really sure, but I do know that sometimes XenForo's online counts can be off by one and you have to refresh to get the actual number of visitors. That is normal behavior because of when the session data is saved, I believe.



Only when exceeded. I could modify it to update a new date when the old value = the new value. The reason I didn't add that is because on smaller boards, the tie value may be set a lot, so that would mean a lot of writes to the registry.

Thanks for your responses. I personally think it should be a new record date when tied.

I hope you like suggestions :) Just my 2 cents but it would be cool if you could set the individual counters by their own date in addition to giving the counters the same reset date.
 
Last edited:
Thanks for your responses. I personally think it should be a new record date when tied.

I hope you like suggestions :) Just my 2 cents but it would be cool if you could set the individual counters by their own date in addition to giving the counters the same reset date.

Suggestions are welcomed, :) I'll add in an option to use the "tie" date, and as well individually resetting the dates.
 
Lawrence updated Icewind Most Online with a new update entry:

New settings and options

Icewind Most Online v1.3

What's new:
- added option to allow for a statistic that has equaled it's most ever value
to be updated with the new set-on date. Note: if the counts are equal, the new date will not be saved until an x amount of time has passed since it's last stored date (determined by the online session value), to ensure the statistic is not updated on every page refresh for forums with a set amount of members.
- The Most Online Tools page has been completely re-done, and...

Read the rest of this update entry...
 
Can I display the total only?
Something simple like:
(Most online was 1000 on 15/09/2015)

It can be done by editing the template(s) you want the total to show. Which template are you using?

Sorry for late dear

I want to display the total in (online users now) sidebar
I don't need the details (visitors, members,robot). I want only the total with the date

Like this:

upload_2015-11-3_10-46-26.webp
 
Sorry for late dear

I want to display the total in (online users now) sidebar
I don't need the details (visitors, members,robot). I want only the total with the date

Like this:

View attachment 121014

That can be done, with the following Icewind Most Online settings:

Forum Home Sidebar Location: Members Online Now
Current Visitors Sidebar Location: Online Statistics
Statistics To Track: un-check all but Visitors

If you wish to change the wording of the text that appears before the date you can change this phrase:
iwd_most_visitors_online_was_x_on
 
That can be done, with the following Icewind Most Online settings:

Forum Home Sidebar Location: Members Online Now
Current Visitors Sidebar Location: Online Statistics
Statistics To Track: un-check all but Visitors

If you wish to change the wording of the text that appears before the date you can change this phrase:
iwd_most_visitors_online_was_x_on

Awesome.
Working perfect

Thanks Lawrence
 
the stats are only displaying on my homepage. on all other pages it shows each stat as zero...

The only other place the stats are shown is the Current Visitors page. That page uses the same values as the home page stats does, so I'm not sure how it would display zero's for anything... perhaps an add-on is interfering (I can't see this happening, though)?
 
it's appearing on every page because i created a widget and set it to 'all'; here's a screen shot of my user's profile page:

profile.webp

i have mws daily statistics installed, but disabled.
 
it's appearing on every page because i created a widget and set it to 'all'; here's a screen shot of my user's profile page:

View attachment 121942

The data for Most Online is only loaded on two pages, forum home, and the Current Visitors pages as this is where XF displays the online stats. The Most Online stats are stored in the Data Registry, so accessing it would be rather simple to code for by the author of another add-on or a widget framework.

i have mws daily statistics installed, but disabled.
Can someone please fill in the blanks on how to use Widget Framework with this? Thanks!!

View attachment 122472

I would like to help but I don't use any frameworks, and never have, sorry. Maybe the author of the framework you are using can help. As I wrote above this quote, accessing the Most Online Stats is relatively easy to add to any add-on.
 
Hi Lawrence. What's the difference between these two phrases:

iwd_most_online_most_visitors
iwd_most_visitors_online_was_x_on

I can see where the first one is used, but what about the second?
Nevermind, I've figured it out. :D
 
Last edited:
If I were to add the widget on pages other than the forum index and online list, how would I create a custom listener to fetch the necessary data? Unlike the addon which adds "message views" to forum statistics widget, I can't figure out this one by myself.
 
You would need to add a listener for the appropriate public controller that will load in the data for that page a member is viewing. The data is stored in the data registry as iwdMostOnlineStats:
XenForo_Model_DataRegistry->get('iwdMostOnlineStats')
 
Hello, I installed memcached(backend cache) and this error popped up immediately, and broke the forum.

Code:
An exception occurred: Illegal string offset 'visitors' in /home/p***775/public_html/community/library/Icewind/MostOnline/Model/OnlineStats.php on line 88

    XenForo_Application::handlePhpError() in Icewind/MostOnline/Model/OnlineStats.php at line 88
    Icewind_MostOnline_Model_OnlineStats->checkMostOnlineSessionCounts() in Icewind/MostOnline/Listener/Proxy.php at line 33
    Icewind_MostOnline_Listener_Proxy::frontControllerPreView()
    call_user_func_array() in XenForo/CodeEvent.php at line 90
    XenForo_CodeEvent::fire() in XenForo/FrontController.php at line 156
    XenForo_FrontController->run() in /home/p***775/public_html/community/index.php at line 13

So I disabled the Most Online add-on and everything started working. Is there a way to fix this? Btw, I also got server error logs if you need that.

Thank you for your time.
 
Last edited:
I think it might be an unserialization issue that affects some version combinations of memcache and php. I put a check in place for it and sent the new file to @orange7 this morning, so hopefully, :)
 
Top Bottom