Support Forum

Exclude usergroup from user stats v5.6.6

HA Hari
Hari
Member

With v5.6.6 you seem to have added a function to exclude certain usergroups from the user stats, if the new checkmark (hide members from users statistics) is set to ON in the admin panel for the usergroup.

I found the code at the end of sp-api-users.php

I was under the impression, that this checkmark would change the statistics display at the bottom of the forum in “sp_foot_desktop” and “sp_foot_mobile”:

“__sp(‘Member Stats: ‘), __sp(‘Members: %COUNT%’)”

Unfortunately, I cant see an effect after setting the checkmark for certain usergroups and saving. Even after some time there is no effect, the count above is still too high and still containing the usergroups I checked for exclusion.

Question:

Did I missunderstand the purpose of this new function?

If not and the count should change, what do I miss? I checked the “Reset” functions in the admin toolbox but found nothing that fits to “reset” the usercount.

14 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

To quote from the popup help:

‘You can also opt to hide any users destined for this user group from showing up in the new members and top posters statistics’

HA Hari
Hari
Member

Sorry but that is cryptic to me. Please elaborate.

Yes, i have read this Help Popup and i have read the additional text too: “but note that if a user belongs to more than one user group and any one group allows them to be listed then they will be shown.”

So my question stays: What do I miss? Why does the count not change in the statistics?

Or do you imply, that the general statistic of the number of forum members is *not* meant by the Help Text, just the “new members” and the “top posters”? Does it imply, that the count stays unaffected, just the usernames of those members dont shop up in “new” and “top posters”?

YS Yellow Swordfish
Yellow Swordfish
Member

The statement does not ‘imply’ it. It s explicit. It makes no mention of counts because counts are not touched.

HA Hari
Hari
Member

I talked about you, not about the helptext. You implied with your response. But dont lets talk semantics here.

Ok. Understood. Then the function is unfortunately not of use to me. I thought it was a reaction on some request I made more than a year ago to Mr. Papa and I was happy and thankfull. Obviously I expected too much.

My problem is, that the standard count generates “Nonsense” to me, because someone just registered to wordpress, is *not* a forum member to me.

I fully understand, that technically *all* registered are forum members in your terminology, because SP is based on WPs users database so someone registered, is a forum member technically because he is part of the memberlist.

But I direct this “registered only” Users into a usergroup with no rights at all, to keep them completely out of the forum. They cant even see the forum via S2Members and they cant access anything. Most of this “registered only” are just Spam.

Thats what I mean with “not a forum member” from (my) content viewpoint.

Ideally I would like the count to display only those, that are true member because they have access. And that was the request more than a year ago, because by exluding the “registered only” user I would generate the “correct” user count.

That just as an explanation. Obviously that is not what this function is supposed to do. I understand now. Any other way to effect the way members are counted?

MP Mr Papa
Mr Papa
Member

yes… if a wp user does not belong to any sp user group, they should not be counted in the member stats if that option is checked…  on travel, so cannot test that its still working, but should be…

YS Yellow Swordfish
Yellow Swordfish
Member

Thanks @bsabantam and @mr-papa – I didn’t even know that option was there 🙂 Well – I might have done once but I am getting old!

HA Hari
Hari
Member

Forgive my intrusion, but is this what you need?

Many many thanks!

*YES*, this is what I was looking for and after checking this box, the count in den statistics at the bottom is *exactly* as it should be. It works. Smile!!

I was obiously not aware of this new checkmark too and would have never expected it in “General Display Settings”.

I guess you should include the reference to this checkmark in the usergroup tooltip we talked about. It is not obvious, that after checking the usergroup, something needs to be done in addition to make it work. You can only search for something, that your are aware of its existence.

HA Hari
Hari
Member

@Mr Papa or to whom it may concern

One small addition/question regarding the calculation.

I have now 3 usergroups that are still “counted” in the sense, that the checkmark for “Hide members from user statistics” is not set.

One has 460 Members

One has 5 Members (Mods)

One has 2 Members (Admins)

All three groups are exklusive, so no overlapping and no users in multiple groups.

So the correct Sum should be 467.

But what is shown in the count at the bottom ist 453.

So it looks like, as if the 7 of both other groups are “subtracted” and not “added” to the first group.

Could you please take a look at the calculation method, maybe something is wrong?

This has low priority, whenever you find time for a check, no hurry.

Thanks!

YS Yellow Swordfish
Yellow Swordfish
Member

I am dubious but @mr-papa and I will check it out…

HA Hari
Hari
Member

A small addition, maybe it helps. Again low priority, no hurry.

Today came Member 461 in the group. If it would be a simple plus/minus it should become 461-5-2=454 now.

In fact it became 452, one less. Funny isnt it?

To repeat: I did a +1 to the group counted. The Sum became -1. Dubious in fact. eek

YS Yellow Swordfish
Yellow Swordfish
Member

It is not reducing by one for each new member.

What it is actually doing is inadvertently taking off from the full member count, the count of admins and moderators twice. At the same time it is also reducing the members count by any member that has never actually visited the forum. And that just means has never opened the page the forum is displayed on.

Obviously the former here is a bug that needs rectifying. The latter could be called either way but on balance O am of a mind to remove that particular oddity.

So this will get a fix for 5.7.4.

MP Mr Papa
Mr Papa
Member

hopefully, we will get 5.7.4 out before end of March…