[Sysnative] Improved Member Stats Widgets - Members Recently Online / Recently Registered [Deleted]

Some additional requested updates have been added. There may be a few minor alignment issues with custom themes - if this is the case you may need to edit your own theme styling to ensure the correct alignment.

Note: If you're currently happy with the add-on, and don't wish to use any of the new styles or exclude usergroups, there is no need to update. :)

I probably won't add too much more to this one, as I'd like to focus on other add-ons, but let me know if there are any issues.
 
Thanks for the new update. Can we make the avatars more smaller, maybe via css?

I am using this addon on the sidebar and it looks very odd right now.
 
Can we make the avatars more smaller, maybe via css?

You can edit the size in the templates directly - either in "sysnative_membersrecentlyonline" or "sysnative_membersrecentlyregistered".

If you find this section:
<xf:avatar user="$user" size="xs" />

And change the size to be "xxs" it should go a size smaller. This is for the "Avatars Only" option. Avatars + Usernames is already set to xxs, and I'm not sure how much smaller XF will allow the avatar to go without more customisation.
 
I wanted it to have it smaller than xxs, I believe the addon I quoted earlier has smaller versions.
But if this is not possible, than no problem.
I wanted to use the "Avatar + Usernames" one but it is not that important, all good, thanks. I'll go back to just usernames.
 
Some additional requested updates have been added. There may be a few minor alignment issues with custom themes - if this is the case you may need to edit your own theme styling to ensure the correct alignment.

Note: If you're currently happy with the add-on, and don't wish to use any of the new styles or exclude usergroups, there is no need to update. :)

I probably won't add too much more to this one, as I'd like to focus on other add-ons, but let me know if there are any issues.
Thanks a lot, love the update :love:

Thanks for the new update. Can we make the avatars more smaller, maybe via css?

I am using this addon on the sidebar and it looks very odd right now.
I love it like this, the shoutbox and everything uses the same avi size so it looks perfect for me 🏆
 
@Will Watts Fantastic update on this add-on. I just finally noticed it and wasn't aware about it. Seems you came through on the feature requests. Great work. A feature that I didn't even request though and will get much use out of is your added feature to exclude usergroups from the widget. The reason I appreciate this is because my site is currently getting hammered by bots and when I use the spam cleaner it leaves bots on the widget with a line crossed through them that makes it not look as neat and good. I will be updating my site with this. Thank you
 
Glad you like the updates!

The reason I appreciate this is because my site is currently getting hammered by bots and when I use the spam cleaner it leaves bots on the widget with a line crossed through them that makes it not look as neat and good. I will be updating my site with this. Thank you

For what it's worth I would 100% recommend @ozzy47 's anti spam mod:


Extremely effective at reducing spam on Sysnative.
 
Yes @Will Watts that's a great idea. I heard it's very effective. I currently don't even have $24 but I plan to buy it as soon as I get some more money which won't be too much longer. That's definitely the next add-on I'm going to buy. It won't be that much longer. I posted in the thread not too long ago. I plan to get it soon.
 
I just installed this today and I really like it.

Our site is run by a nonprofit organization that has dues paying members but our forums are open to the public with registration for some services.

I was wondering if I could have multiple instances with usergroup selection for include and exclude. We also have new registrations that join the association immediately, so it would be good to have both widgets able to use the usergroup select/exclude.

If I could get just the counts, I would use that for another performance widget that would include daily, weekly and monthly numbers without the names. We had something similar on XF1.5 but it did not survive the upgrade.
 
This is slightly off topic but the array_flip function generates an error if the secondary_group_ids contains an id that is not an integer (the error check does not error on strings either).. Since the error is a warning, I could just ignore it, but it is filling up my error log.

I would just run a query against the user table to repair the problem, but my regular expression skills are not very good. Can anyone furnish the replace expression to do this?
 
I located the user record that was in each of the error reports. It had a unique set of additional usergroups. I modified it so that it did not have the combination that was distinct (24, 100) but the error remained with the reference to that pair of usergroup id's. I tried to clear all the user related cache, but that had no effect either.

I modified the routine to have error_reporting(E_ERROR | E_PARSE) which eliminated the error reporting, The warning errors were being generated every 20 to 30 seconds. I do not know where this user information is cached but I hope it will work its way out of the cache in a few days. I will wait a day or two and turn the error reporting back on.
 
Would it be difficult to add the usergroup selection to the recent registration widget? It looks like it only needs a single piece of code with the exclude usergroup function to be copied from the visits widget.
 
I decided to use the recently online widget to display our two primary usergroups our paid NAWCC Members and our Friends who bring interesting questions and many insightful answers but do not pay dues to the NAWCC.

I decided that th most useful form for us would be two full displays of names with with a switch next to the widget title that would hide all the names and just leave the count of visitors in the bottom border. We normally have 2 or 300 visitors in each group in a 24 hour period..

The problem I did not understand until I was well into this is that the template for the widget is common to the instances of the widget so one needs to ensure that each template has its unique information for the .less file and the javascript function. I probably should have use the widget ID for that purpose but instead I used the first word in the title which I made unique to each instance ie. NAWCC and Friends.

PHP:
<h3 clast fs="block-minorHeader">{$title} online 24 hours&nbsp;&nbsp;&nbsp;<button onclick="fn{$title}()">^</button></h3>
<div id={$title}>
The button action is named for the title with fn prefix and the controlling div that will be: display: inline-block or display: none to show and hide the full list.

For the .less file, I just made two instances of the div with each name.
Less:
#nawcc {
  display:inline-block;
}
#friends {
  display:inline-block;
}

The script is basically a lift from w3schools with modification to use the title variable.
Code:
<script>
function fn{$title}() {
  var x = document.getElementById("{$title}");
  if (x.style.display === "none") {
    x.style.display = "block";
  } else {
    x.style.display = "none";
  }
}
</script>
Please feel free to use this if you like. I have not really learned how to use GitHub yet.
 
Thanks! I got it working! Just had to add the widget. Does anyone know how I can enhance this a bit more by adding something like this:
BIRTHDAYS
Congratulations to: <Username>(19)
STATISTICS
Total posts 210862 • Total topics 25376 • Total members 10103 • Our newest member <Username>

or

Members Recently Online: 5
Members Recently Registered: 2
(Instead of having a row displaying Total: 5, I want to bring the total to the title)
i want this too
 
Top Bottom