View Full Version : Secretly ban a user
Frank
03-15-2002, 10:00 PM
Secretly Ban a User v1.1.0
##########################
This hack is based on the idea of the hellban hack by intellected (https://vborg.vbsupport.ru/t35308/s.html) and overgrow's Quick & Easy account banning hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=35589).
It is a lot simpler than the hellban hack (although not as extreme!) and does not have the problems of user being able to quote and view the post.
The user is unaware that they are banned. Nobody see's their posts either in the main thread view or when replying to a thread. Admins and mods see their original post with a notice they are banned. They see the thread as though they were a normal user. This fixes the problem of friends warning them they are banned.
Enjoy =)
21 June 2002: Installation Instructions v1.1.0 (https://vborg.vbsupport.ru/attachment.php?s=&postid=263945)
Full instructions included in the intall file :)
Frank
03-16-2002, 01:43 PM
Screeny of other user's view. The banned user sees their post as completely normal :D
Robert9
03-16-2002, 06:03 PM
nice hack!
intellected
03-16-2002, 08:43 PM
You win! My implementation sucked anyways. :)
Frank
03-17-2002, 10:02 AM
Originally posted by intellected
You win! My implementation sucked anyways. :)
Hehe, but I did like the idea of an Internal server error ;)
intellected
03-17-2002, 10:26 AM
Originally posted by Frank
Hehe, but I did like the idea of an Internal server error ;)
Heh - the next version will produce an error page like this:
http://www.somethingawful.com/nointelligence/index.htm
Originally posted by intellected
Heh - the next version will produce an error page like this:
http://www.somethingawful.com/nointelligence/index.htm
LOL, that'll be cool. cant wait til u get that hellban working, until then i'll test this out.
Riddel
03-29-2002, 04:46 AM
this may be a stupid question but how do you set the usergroup id to 8?
Logician
03-29-2002, 05:54 AM
Hey,
Originally posted by Riddel
this may be a stupid question but how do you set the usergroup id to 8?
You dont set usergroupid to 8. You set 8 in this hack to whatever your new usergroup's id is. ;)
In your admin cp, create a new usergroup named eg. "Secretly Banned Users" then choose "modify Secretly Banned Users", but click right mouse button and choose open in new window. Then look at the address line in your browser, at the end of line you'll notice usegroup id of your Secretly Banned Users group. Whatever it is, replace 8 here with that number..
Frank
03-29-2002, 09:16 AM
Yep that's right :D
Riddel
03-29-2002, 09:00 PM
thank you so much! it works great!
I think you need to change it to this
// Begin Account hide hack
if ($post[usergroupid]==10) {
if ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7) {
$post[message]="<normalfont><b>[account removed for abuse]</b></normalfont> <smallfont><i>Admins and Mods can view the post but nobody else does:</i><br> <br></smallfont>".$post[message];
eval("\$retval = \"".gettemplate("postbit")."\";");
} else if ($bbuserinfo[userid]!=$post[userid]) {
eval("\$retval = \"".gettemplate("postbit_banned")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
// End Account hide hack
it looked like the banned user would see no post at all instead of seeing the post unchanged.
Mutt is correct , if you use the other they wont see a post at all.
Very nice and easy hack and also has made me laugh my a$$ of alot also.
ezdreamer
04-02-2002, 06:20 AM
Originally posted by Mutt
it looked like the banned user would see no post at all instead of seeing the post unchanged.
Thanks for the addition to this hack.
BTW, there is one thing that would tip off the banned user that s/he is being banned. I tried a test and when banned using this method they can't post any new replies and it takes me to the standard not logged in or you are being banned by admins page.
Is there a way that a banned user can still post, but that goes immediately into hidden mode so no one else can see except the banned user. I think this way it will be more effective in secretly banning the abuser into thinking that everything is normal.
Frank
04-04-2002, 10:26 AM
Originally posted by ezdreamer
I tried a test and when banned using this method they can't post any new replies and it takes me to the standard not logged in or you are being banned by admins page.
That's cos you haven't edited the permissions of whatever usergroup you used and set them to be able to browse and reply. Just set this usergroup to the same as your registered group and they will think everything is fine ;)
Installation Instructions for v1.0.2
ezdreamer
04-04-2002, 02:57 PM
Thank you. :classic:
Erwin
04-08-2002, 09:03 AM
Bug:
When a user hits the "Post Reply" button, the offending post still shows up in the "Topic Review" section at the bottom.
Any fix for this???
Frank
04-09-2002, 08:52 AM
Originally posted by Erwin
Any fix for this???
Not yet, this looks like an oversite on my part. I'll look into this asap, but it's a bit difficult as I only have internet access at work at the moment, having just moved house. Cannot ftp to my shell account at the moment so cannot test any fixes.
If anyone else would like to try until I get connected at home, then feel free :)
Erwin
04-10-2002, 10:36 AM
I have made a fix for a bug with this hack.
At the moment, although normal members cannot see the secretly banned member's posts in show thread, they can see the post when the normal member clicks on Post Reply - the post still shows up in the Topic Review at the bottom of the page.
With this fix, when a member is secretly ban, no one else can see the secretly banned member's post in the Topic Review except for the member himself and staff. To everyone else, the person's post content in the Topic Review says "This member has been banned."
I have tested this and it works.
In newreply.php,
FIND:
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
REPLACE WITH:
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid,usergro upid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
(Basically finding out the usegroupid of the poster by adding the usergroupid field to the query).
Then FIND:
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
REPLACE WITH:
if ($post[usergroupid]==13) {
if ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7) {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
} else if ($bbuserinfo[userid]!=$post[userid]) {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbitban")."\";");
} else {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
}
} else {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
Replace the number 13 with the usergroupid of the secretly banned usergroup in your forums.
THEN make a NEW TEMPLATE:
threadreviewbitban
with the content:
<!-- spacer -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#FFFFFF">
<tr>
<td><img src="https://vborg.vbsupport.ru/vbimages/clear.gif" alt="" width="10" height="1"></td>
<td width="100%">
<!-- /spacer -->
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="$backcolor" valign="top" width="175" nowrap><normalfont>$username</normalfont></td>
<td bgcolor="$backcolor" valign="top" width="100%"><normalfont>This member has been banned.</normalfont></td>
</tr>
</table>
</td></tr></table>
<!-- spacer -->
</td>
<td><img src="https://vborg.vbsupport.ru/vbimages/clear.gif" alt="" width="10" height="1"></td>
</tr>
</table>
<!-- /spacer -->
This is a better fix than the one I posted here earlier - it works better - the previous one I posted here makes the secretly banned member's post ignored in the Topic Review, but with this one you have your own secretly banned member's template.
If you used my previous fix, update to this one. :)
Erwin
04-10-2002, 07:57 PM
My fix for the Topic Review bug has been updated - just making sure people know. :)
lordofgun
05-14-2002, 02:42 PM
erwin, it has been fixed in the original attachment?
Erwin
05-14-2002, 10:37 PM
I don't think so.
TheDutch
05-20-2002, 10:55 PM
I would like the banned user and moderators to see his own post and the normal users to just dont see the post. That way people arent able to alert the banned user....when he perhaps has friends on the board.........
Can you arrange this??
TheDutch
Martin64
06-13-2002, 11:01 PM
Originally posted by TheDutch
I would like the banned user and moderators to see his own post and the normal users to just dont see the post. That way people arent able to alert the banned user....when he perhaps has friends on the board.........
Can you arrange this??
TheDutch
Exactly what I was thinking, TheDutch. What I did was to make a completely empty template (postbit_banned) and that solved the first problem. Now the banned user would see his own original post, admins & mods would see the original post with the "this user has been banned" note and the regular users wouldn't see any post at all by the banned user.
The new problem was that the banned user is still able to start a new thread. If he/she does start a new thread, the thread would be empty and have no content and all (except title), and would seem odd for most people (except the banned user who wouldn't notice ;))
Is there a way to hide new threads as well? Great hack so far though. :)
Edit: Of course it would be possible to remove the permission to post new threads for the banned user, but then again, wouldn't that be a little suspicious? :D
Frank
06-21-2002, 12:26 PM
Updated hack to include all changes so far in this thread, please see first post in thread for full info :)
Martin64
06-21-2002, 01:29 PM
...which still doesn't solve the problem with the banned user being able to post a new thread? I just don't think it makes sense that other users can see the posts that the banned user have made (not the content, but that he/she has posted).
Frank
06-21-2002, 01:35 PM
Originally posted by Martin64
...which still doesn't solve the problem with the banned user being able to post a new thread?
Nope, I guess that's the next thing to work on.
I just don't think it makes sense that other users can see the posts that the banned user have made (not the content, but that he/she has posted).
They can't, they don't see anything because we now have a blank template.
Martin64
06-21-2002, 01:48 PM
Right yes, I see you noticed my suggestion above. :P
Now go work on hiding new threads posted by the secretly banned users as well! ;)
Nice job, Frank. :)
Dyntheos
06-24-2002, 02:43 AM
First newreply.php is not in the admin directory as stated in the .txt file Iam assuming you mean the newreply.php in the root?
second when I try this and make the additions to the newreply.php I see
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid,usergro upid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE ".iif($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7,"","post.visible=1 AND ")."post.threadid='$threadid'
ORDER BY dateline DESC");
instead of this
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
which is in the .txt file and what i should find in the newreply.php
is this due to the hidden reply hack being added for admins/mods on my forum, and if so, how can this be intergrated into this new hack?
I tried adding the usergroupid to the second line as stated in the instruction but that only threw up errors when someone went to make a reply.
Hoping this hack will be able to get up and running as it's use would fix several repeat offenders of the "I've been banned so i'll change my host mask and re register" type person.
Lissa
06-25-2002, 05:55 PM
I have the same problem as Dyntheos. I went ahead and installed it anyway, and I get this error when trying to reply to ANY thread:
Parse error: parse error, unexpected T_ELSE in /home/.lysanne/lissy/lissaexplains.com/forum/newreply.php on line 474
Any ideas? This seems like an awesome hack and I'd love to be able to use it.
I'm running v 2.2.6 :)
Boofo
06-30-2002, 08:27 PM
When a new user tried to do a newreply, I got this error:
Parse error: parse error, unexpected T_ELSE in /home/boofo/public_html/forum/newreply.php on line 591
Here is a section of code it refers to. Can anyone plese help me?
$threadreviewbits = '';
while ($post=$DB_site->fetch_array($posts)) {
if ($postcounter++ < $maxposts) {
if ($postcounter%2 == 0) {
$backcolor = "#13486D";
$post[bgclass] = "alt1";
} else {
$backcolor = "#1C5780";
$post[bgclass] = "alt2";
}
$username=$post[username];
if ($ignore[$post[userid]]) {
$reviewmessage = $ignoreduser;
} else {
$reviewmessage = bbcodeparse($post[pagetext],$threadinfo[forumid],$post[allowsmilie]);
}
// Begin Account hide hack
if ($post[usergroupid]==8) {
if ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7) {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
} else if ($bbuserinfo[userid]!=$post[userid]) {
eval("\$threadreviewbits .= \"".gettemplate("postbit_banned")."\";");
} else {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
}
} else {
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
// End Account hide hack
} else {
break;
}
}
if ($DB_site->num_rows($posts)>$maxposts) {
eval("\$threadreviewbits .= \"".gettemplate("threadreview")."\";");
}
Line 591 is this line included below:
Line 590 // End Account hide hack
Line 591 } else {
Voltron420
07-20-2002, 02:02 AM
I'm getting the exact same errror.
Boofo
07-20-2002, 03:24 AM
The answer is here. Enjoy! :)
https://vborg.vbsupport.ru/showthread.php?postid=267821#post267821
Originally posted by Voltron420
I'm getting the exact same errror.
Voltron420
07-20-2002, 10:13 AM
Originally posted by Boofo
The answer is here. Enjoy! :)
https://vborg.vbsupport.ru/showthread.php?postid=267821#post267821
OK, that fixed the problem.
Did anyone have any luck on figuring out how to hide the persons thread topics on the topic listing pages? Unfortunately this is a sure fire way for other people to notice that the user has been banned because they all replay to the blank thread with "Why can't I see the post?"
Probably a bit complex to solve...though only a line or three once u figure it out...I'll give u a hint...
you need to find where the select statement happens to get the list of threads (probably in functions.php or forumdisplay.php)...and make sure that in the join to the threadstarter...their usergroupid is included in the query...and if the usergroup id belongs to that user...exclude that thread...
Problem is...it will still show up in searches...and view new posts and today's posts etc...
But to fix that u just go with the same concept...except in search.php instead...
Hope this helps...
Boofo
08-10-2002, 06:48 AM
Ok, now I'm totally confused. ;)
Can you show us what to do to fix it? Maybe use the permissions check? :)
Originally posted by dwh
Probably a bit complex to solve...though only a line or three once u figure it out...I'll give u a hint...
you need to find where the select statement happens to get the list of threads (probably in functions.php or forumdisplay.php)...and make sure that in the join to the threadstarter...their usergroupid is included in the query...and if the usergroup id belongs to that user...exclude that thread...
Problem is...it will still show up in searches...and view new posts and today's posts etc...
But to fix that u just go with the same concept...except in search.php instead...
Hope this helps...
rinkrat
08-28-2002, 08:51 PM
I'm just making it so users at this level can't start threads or send PM's.
The Realist
09-27-2002, 08:25 PM
I have unbanned a user but the words [account removed for abuse] Admins and Mods can view the post but nobody else does: still show up in there posts?
How can this be changed so that once I unbann osmeone this text does not show anymore.
Thanks,
Brian
Link14716
10-02-2002, 08:24 PM
Update Counters, I suppose ;)
sklwer
10-09-2002, 03:39 PM
Tried to make this work on version 2.8 but i found
Find:
eval("\$retval = \"".gettemplate("postbit")."\";");
Replace with:
// Begin Account hide hack
if ($post[usergroupid]==8) {
if ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7) {
$post[message]="<normalfont><b>[account removed for abuse]</b></normalfont> <smallfont><i>Admins and Mods can view the post but nobody else does:</i><br> <br></smallfont>".$post[message];
eval("\$retval = \"".gettemplate("postbit")."\";");
} else if ($bbuserinfo[userid]!=$post[userid]) {
eval("\$retval = \"".gettemplate("postbit_banned")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
// End Account hide hack
but on the
Modifications to ./admin/newreply.php:
#########################################
Find:
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
Replace with:
// Begin Account hide hack
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid,usergro upid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
// End Account hide hack
I am not sure if i have to remove all of:
Modifications to ./admin/newreply.php:
#########################################
Find:
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
Replace with:
// Begin Account hide hack
$posts=$DB_site->query("
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid,usergro upid FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='$threadid'
ORDER BY dateline DESC");
// End Account hide hack
Installed on vB 2.2.8, thanks - the installation took a bit of tweaking (just common sense, nothing too tricky) and it works fine. Installed the fix provided by Firefly, it fixed the newreply.php error.
A coupler of issues:
1. The banned user's name still appears in the "Last Post By:" section on the front page.
2. Allowing banned members to post new threads results in threads being created with no first post - disaster!
It would be great if only threads that were started after the user's ban were invisible. :(
Sengir
10-19-2002, 01:49 PM
Hmm I'll wait to install this hack until it is completely finished..
There are other problems -
For example, we've had users who have made valuable contributions to the board, and then we've had to ban them for various reasons.
With this hack, all of the banned user's posts disappear! So, if they've started threads in the past, or they've posted in other threads, it'll all disappear.
This problem can be easily fixed, I'm going to add it to my board when I get a few spare minutes :banana:
MajorGeek
11-15-2002, 02:19 AM
Im staying away. In first and last of 3 attachments you provided, the newreply.php does not match with 2.28, dont want to risk problems. Your second attachment totally leaves the newreply.php changes out completely. From reading through here, theres a few other mistakes.
I would like to see an updated version with everything fixed for 2.28 if possible? Thanks either way.
cgwillis
11-20-2002, 10:11 PM
Originally posted by dwh
Probably a bit complex to solve...though only a line or three once u figure it out...I'll give u a hint...
you need to find where the select statement happens to get the list of threads (probably in functions.php or forumdisplay.php)...and make sure that in the join to the threadstarter...their usergroupid is included in the query...and if the usergroup id belongs to that user...exclude that thread...
Problem is...it will still show up in searches...and view new posts and today's posts etc...
But to fix that u just go with the same concept...except in search.php instead...
Hope this helps...
Basically I am using this to ban people who create accounts with the sole intent to send libelous comments. I need any threads that they have created to disappear so I have been trying to do what you are saying. I understand that basically you do the same hacks as in newreply.php, but in another file so that the threads will disappear, but I can't seem to find it. I just don't know the internal system enough for that. Does anyone know where to call the query for the permissions to view threads?
extreme_old
12-03-2002, 05:51 AM
what a piece of ++++
thanks to this hack, i got banned like this from a forum!!!! ++++ it pieces me off, didn't even realise til about 2 weeks later when i realize i can't see any new threads!!!!
extreme_old
12-03-2002, 05:51 AM
what a piece of ++++
thanks to this hack, i got banned like this from a forum!!!! ++++ it pieces me off, didn't even realise til about 2 weeks later when i realize i can't see any new threads!!!!
MajorGeek
12-03-2002, 12:56 PM
So, what your saying is that it works well? :)
Originally posted by extreme
what a piece of ++++
thanks to this hack, i got banned like this from a forum!!!! ++++ it pieces me off, didn't even realise til about 2 weeks later when i realize i can't see any new threads!!!!
jwischka
12-17-2002, 02:44 AM
lol.... definitely a testimonial from a satisfied customer.
~jeff
Colon33
12-22-2002, 07:29 AM
Is there a way a set this to IGNORE by IP address? So even if the users reregisters they wont appear anyways? I think this would be just as sweet. Or how about Ignore by HOSTMASK or something for those dynamic arses. :)
Ellery Sneed
12-28-2002, 01:31 PM
Does this work with 2.2.9, also is there updated txt file someone can upload?
Taco John
12-29-2002, 06:45 AM
How about a button on the post that allows the mod to reveal individual posts of the banned user ("reveal this secretly banned post")
hamed
01-03-2003, 03:16 AM
Xenon has added some code to use this hack. See this page:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=47150&perpage=15&display=&pagenumber=1
Tanx again to him :)
Sweet Cheeks
01-15-2003, 02:25 PM
This sounds like a great hack for some of our annoying trolls :cool:
Just 1 question, is there any way to make it so only admin see the banned users post and not Moderators?
catbaba
01-29-2003, 04:59 PM
A small performance tip: Add postbit_banned to $templatesused at the top of newreply.php.
catbaba
01-29-2003, 05:01 PM
Originally posted by ~*Julie*~
Just 1 question, is there any way to make it so only admin see the banned users post and not Moderators? Change the lines: if ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7) { ... to .... if ($bbuserinfo['usergroupid']==6) { That's it! :)
Courage
04-01-2003, 09:08 AM
I installed this hack and ituls + Miseable User Hack, but I have a question.
If I suscribed to a thread and a Secretly Ban User make a new post do I receive notification ?
I do not want to receive notification
10x
Courage
04-01-2003, 02:04 PM
10x to Erwin, here is the answer to my question:
In admin/functions.php, find:
AND user.userid<>'$userid'
Underneath, ADD:
AND $bbuserinfo[usergroupid]<>'8'
Change 8 to the usergroupid of the secretly banned members usergroup.
dniMTheory
08-03-2003, 10:07 PM
i just installed this today on 2.30. it works perfect after you apply the additions by Xenon from post #54.
The only thing i couldn't figure out was how to prevent the banned members name from showing under the "last post" column.
nice work fellas....clicks install
warpeditor
02-04-2004, 08:24 AM
2.3.4
I am still getting parse error on newreply.php.
Even I copied Chen's solution but no luck.
Anybody?
Eagle Creek
08-11-2004, 10:51 AM
Cool hack!
Is there a versnio for 3.0.3?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.