Male-Female Ratio to Exclude Banned Members

Started by cornutt, August 05, 2009, 10:52:34 PM

Previous topic - Next topic

cornutt

A minor thing, but... Seems that all of the spammers register as male.   O:)  That screws up the male-female ratio.  I admin on a board where this stat is of particular interest.  Is it possible to make the ratio calculation exclude banned usernames?

raggi5

ban them, just delete their profiles :) the ban is still effective...

Arantor

raggi5 has it right, plus it'll save you a little space in the DB too.

If you don't want to delete the account (because it can allow the previous person to be emailed), we might have to look at the database queries/code to be modified manually.
Holder of controversial views, all of which my own.


Norv

I think a little feature here may make sense. It's a small thing, yes, but it makes sense that banned members are not really considered to statistics and all, or at least that their inclusion is optional. After all, they are not really members (=potentially contributing members), like the members for which it makes sense to make statistics about.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Arantor

I can see the argument, though deleting the account would do it.

The thing is, there isn't a flag against an account itself to say "Hey banned!" There's not a field in the members table to reflect that. When a banned member tries to log in, what stops them isn't a flag in members table, but the ban list, which happens to contain the user name.

Sure you could add a field that says 'is_banned' to the members table, and exclude that in stats. It's not a huge amount of work to do, but it does have to be done in a few places.
Holder of controversial views, all of which my own.


Norv

The discussion of the concept should be different however, from the discussion of the implementation.
As far as the concept goes, being banned is similar to being "not activated" yet: the account exists, but it does not take active part to forum (cannot do so unless or until the administrator does something), and various statistics take that into account.

As far as implementation goes, the code can very well exclude from the list of results those on banlist(s). Could be done by adding conditions / joins to the queries getting information about members. Or, considering trade-offs with performance, could be done indeed by adding a field similar to "is_activated" (not sure I remember the name exactly), like said: "is_banned".

Then again, it all concerns only the members banned (the accounts), not just any ban. There would be members banned not themselves, but because of IP range for example, which will still take part in statistics.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Aleksi "Lex" Kilpinen

Actually, banned members should not appear in stats. Not even as members (the membercount drops when you ban someone. ) - so if you are right, I see this as a bug.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Norv

Tested a SMF 2.0 RC1.2 fresh installation, 2 members, one male, one female, and the male, named "test", is banned. Result:
Forum stats:
Quote
4 Posts in 2 Topics by 2 Members. Latest Member:  test
Statistics Center:
Quote
Total Members: 2
...
Latest Member: test
Average Male to Female Ratio:   1:1
...
Top 10 Posters
test 2

So the banned member it's fully taken into consideration, it seems. It makes sense for posts... as obviously the last post may have been one of a banned member, so that's it, is the last post.
For total members however, and the rest of the statistics... I would find understandable to have the banned members treated like they are some sort of "grey" area, like the not-activated members, not in total members anymore, not taking part in statistics referring to snapshots of the present (current situation: how many [potentially active] members, male to female ratio).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Aleksi "Lex" Kilpinen

I really do believe it was supposed to be so that banned members are only available on the admin memberlist, but the stats etc should exclude them.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Norv

Ah, I was admin, when reading the stats.
Thank you! Strangely enough, despite the stats above, when I go (with the same admin member) to the member list (action=mlist), I do not see the banned member on the member list. (and it says 1 member there)

UPDATE: Tested with a third (normal) member, and first time I see stats counting the banned members, but after a while (or after running Admin > Maintenance > Forum maintenance > Routine > Recount all forum totals and statistics), the stats are updated as LexArma says: the totals, the male to female ratio, do not contain banned members.

Still they don't appear on admin member list anymore no matter what. (but of course the admin has access to them by accessing the banlist).

==>
cornutt: the feature is already there, perhaps it would be useful though to run "Recount all forum totals and statistics" as said above, to have the statistics updated.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Aleksi "Lex" Kilpinen

Quote from: Norv on August 07, 2009, 12:33:19 PM
Still they don't appear on admin member list anymore no matter what. (but of course the admin has access to them by accessing the banlist).
Admin memberlist is the memberlist available from the AdminCP - and that one should still have the ban member in it if I'm not mistaken.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Norv

Confirmed again :)
Admin > Members > View All Members (action=admin;area=viewmembers) displays the banned members.
Members (action=mlist) does not display the banned members.

Thank you, Lex! (I wonder, why do you need us for?  *snickers* )
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

cornutt

Quote from: Norv on August 07, 2009, 12:33:19 PM
cornutt: the feature is already there, perhaps it would be useful though to run "Recount all forum totals and statistics" as said above, to have the statistics updated.

Seems like I did that, but I didn't try looking at it afterwards with a non-admin account.  Also, I didn't realize that you could delete the account of a banned member and have the username ban stay in place (since you can't ban the username of a nonexistent member).  I'll try both of these.

Norv

I doubt you can delete the account and still keep the ban on the username. Only the rest of the triggers are preserved, it seems.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Arantor

I think you can, since as far as I understand it the user name trigger should also remain to prevent signing up again.
Holder of controversial views, all of which my own.


Norv

No, the ban is stored against user id, not name.
Test it also: deleting the banned member removes the trigger on "username".
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Aleksi "Lex" Kilpinen

It is designed so that bans are for existing members basically, but you can ban usernames in advance by setting them reserved or as sencored words. Both will stop registration with the username. ;)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

emanuele

Necroposting FTW!

Quote from: N. N. on August 07, 2009, 10:25:27 AM
After all, they are not really members (=potentially contributing members)
Then why their posts still show the link to their profile and the profile is accessible to anyone?
To me sounds like an inconsistency: if you (in general, anyone around) think that banned members are "not really members" then they must be *really* invisible everywhere no matter what. Otherwise they are just members not able to post any more, but not invisible, so IMO they should be visible in the memberlist, take part in statistics, etc.
At the moment it's a mixed status that doesn't make much sense (the ban status is not shown to anyone that is not admin, but it could be deduced "just" looking at who has a visible profile, but doesn't appear on the memberlist).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Joshua Dickerson

Completely agree with emanuele. If you want someone to not show up, remove them. Otherwise, they are still there, just on time-out.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Advertisement: