PDA

View Full Version : Quick & Easy account banning


Overgrow
03-01-2002, 10:00 PM
Disclaimer:

-No support is offered for this hack. If you PM or email for support, it will be joyfully ignored. When I have time, I will answer questions in this thread.

Quick Account Banning

Every forum has annoying users that need to be banned. On my site, we can't allow minors to post so they also fall into that category. While I like the 'hellban' hack, it adds a JOIN to showthread that I'm not too keen on.

This is a quick and easy method to remove an account without having to delete all of their posts. This helps a few things:

-leaves the evidence of why this account was removed. If you delete all the posts, there is no way to find out why a certain account was deleted a month later.
-no long delays on boards with large searchindexes as you delete a hundred posts
-as easy as changing the annoying person's usergroup
-the 'stealth ban' feature will remove someone's posts to everyone except them

How to install this hack:

-create a new usergroup for "Suckers" and note the usergroupid
-open admin/functions.php and find:

$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

below that add:

// HACK: ACCOUNT REMOVAL
if ($post[usergroupid]==44) {
if ($bbuserinfo['usergroupid']==6) {
$post[message]="<normalfont><b>[account removed]</b></normalfont>&nbsp;&nbsp;
<smallfont><i>Admins see it anyway:</i><br>&nbsp;<br></smallfont>".$post[message];
} else if ($bbuserinfo[userid]!=$post[userid]) {
$post[message]="<normalfont><b>[account removed]</b></normalfont>";
}
$post[title]="";
$post[signature]="";
}
// END HACK

-change the "44" in the code to whatever usergroupid you added for Suckers


That's it. Whenever you want to remove an account's posts without actually deleting them, just change their usergroup.

Neo
03-02-2002, 07:57 AM
Nice Hack.

Saiyan XL
03-02-2002, 01:30 PM
yep, I am gonna install it now!!

Psychdrone
03-02-2002, 05:11 PM
I am having trouble understanding ezactly what this hack dose

Overgrow
03-02-2002, 05:16 PM
Sure, here is what it does, step by step:

-Create a usergroup for morons
-Whenever anyone in the usergroup for morons posts, everyone else will see:

"[account removed]" instead of their message, but the morons will still see their message

-This effectively deletes all of their posts without having to do it.. plus since they still see their own posts, they might be fooled for a while and not re-register.

nafae
03-02-2002, 06:19 PM
but eventually, as they continue and continue to post, (IE if they think noone is looking at their post, keep posting "BUMP" messages etc) won't it just keep on adding posts to your db?

Overgrow
03-02-2002, 06:33 PM
It sure will.. but with my board, the 0.1% of troublemakers don't really affect the post count. If someone is spamming the board constantly, you'll have to deal with that another way.

I use this hack in conjunction with two other things-- the "morons" usergroup also restricts them from posting everywhere except for one forum (the free for all junk forum). I also have a small hack that prevents guests from posting more than once every 10 minutes.

I'll write up that anon flood check hack and post it here in a few..

Gamingforce
03-03-2002, 05:07 AM
Hey Overgrow, awesome hack but there is one small bug with it. You can still read the person's post by clicking on the "quote" button. Thanks a lot and keep up the good work bro.

Overgrow
03-03-2002, 05:17 AM
Ah good point.. and you can also still search for posts and read the first few lines in the search results box. It was just meant as a down and dirty solution. I'm sure the holes could be patched.

I looked into fixing the search result hole but it would require overhead to check what usergroup the person is in before displaying each search result. Maybe a check on that when it first sees that you are searching on a user name.

Hmmm.. I looked into fixing the "quote" hole and you can also read the post in the threadreviewbits... Every hole mentioned can be patched but they all involve querying the user table to find out what usergroup the person is in. With threadreview and searchbits, that would add up to alot of queries-- more than I want to add...

Like I said, this is a quick fix and meant to annoy the moron more than anything since 99% of the users won't see their posts anymore :D

Lesane
03-03-2002, 07:56 AM
Very nice hack, well done. Thanks :up:

psico
03-08-2002, 11:47 AM
Originally posted by Overgrow
Ah good point.. and you can also still search for posts and read the first few lines in the search results box. It was just meant as a down and dirty solution. I'm sure the holes could be patched.

I looked into fixing the search result hole but it would require overhead to check what usergroup the person is in before displaying each search result. Maybe a check on that when it first sees that you are searching on a user name.

Hmmm.. I looked into fixing the "quote" hole and you can also read the post in the threadreviewbits... Every hole mentioned can be patched but they all involve querying the user table to find out what usergroup the person is in. With threadreview and searchbits, that would add up to alot of queries-- more than I want to add...

Like I said, this is a quick fix and meant to annoy the moron more than anything since 99% of the users won't see their posts anymore :D


Any news? I?m waiting for this fix to install it...

Chris M
05-24-2002, 07:41 PM
Great idea!

I just made a .txt file, so that people like myself, who like to do things from easier to read instructions, and sometimes offline, can do so...

Satan

papa
01-29-2003, 03:24 AM
how can I get the usergroup id?

papa
01-29-2003, 03:50 AM
got it figured out. thank anyway