ElkArte Community

Elk Development => Feature Discussion => Topic started by: kode54 on November 14, 2016, 05:26:22 pm

Title: Public display of ban status by users' posts
Post by: kode54 on November 14, 2016, 05:26:22 pm
Currently, when we ban someone, we also set their default user group to a special disabled "Banned" group. This is also a feature required by the Banhammer script, since it doesn't talk to the actual forum API and needs a simple way to ban people.

But the primary reason to do this when banning through the normal forum system is so that it displays a handy "Banned" tag under their user name, by every one of their posts, so people get the idea that this is not the sort of posting we find tolerable.
Title: Re: Public display of ban status by users' posts
Post by: kucing on November 14, 2016, 09:10:46 pm
and/or changing their avatar to banned picture too?

(https://s20.postimg.org/xfghkrlul/user_banned_please_carry_on_2.png)
Title: Re: Public display of ban status by users' posts
Post by: ahrasis on November 14, 2016, 09:54:07 pm
I think you can set/use group image for that, right?

Or are you requesting a feature that an avatar of banned user should be changeable to something like the above?

If it is considered as a feature, maybe that default banned avatar and/or group image can be customizable via css?
Title: Re: Public display of ban status by users' posts
Post by: live627 on November 15, 2016, 07:00:42 am
Quote from: kucing – and/or changing their avatar to banned picture too?

Banned for posting a large pic :P
Title: Re: Public display of ban status by users' posts
Post by: ahrasis on November 16, 2016, 01:21:16 am
I think that transparency thingy can be done by css too, right (or may be wrong)?
Title: Re: Public display of ban status by users' posts
Post by: emanuele on November 16, 2016, 04:45:51 pm
There are few ways to achieve this.
But first a bit of analysis of what a ban can be.
A member can get banned in a couple of ways:
1) direct on the account,
2) by falling into any "range" of general bans (IP, hosts, mail address).
I feel like what you are after is just the first: a banhammer fallen on the member for a certain behaviour and not a general ban, for example to exclude a country or a set of spammers (I hope you delete spam messages and as such the point of changing appearance of the posts would be moot. :P).

That said, the best course of action (to me) would be to add a secondary (special?) group to the member and then rely on that to add a (css) class to the message, and then use that class to style whatever you like.
I'm not sure if it is possible to "intercept" the ban action via hooks, most likely not. Add the class is trivial.