vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Secretly ban a user (https://vborg.vbsupport.ru/showthread.php?t=36205)

Frank 03-15-2002 10:00 PM

Secretly ban a user
 
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/showthrea...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

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

Quote:

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

Quote:

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

hagi 03-17-2002 04:45 PM

Quote:

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,
Quote:

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!

Mutt 03-31-2002 01:01 PM

I think you need to change it to this

PHP Code:

        // Begin Account hide hack
        
if ($post[usergroupid]==10) {
            if (
$bbuserinfo['usergroupid']==|| $bbuserinfo['usergroupid']==|| $bbuserinfo['usergroupid']==7) {
                
$post[message]="<normalfont><b>[account removed for abuse]</b></normalfont>&nbsp;&nbsp;<smallfont><i>Admins and Mods can view the post but nobody else does:</i><br>&nbsp;<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.

Ren 04-01-2002 09:23 PM

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

Quote:

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

Quote:

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

Quote:

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:

PHP Code:

  $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:

PHP Code:

  $posts=$DB_site->query("
        SELECT IF(post.userid=0,post.username,user.username) AS username,
        post.pagetext,post.allowsmilie,post.userid,usergroupid 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:

PHP Code:

          eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";"); 

REPLACE WITH:

PHP Code:

       if ($post[usergroupid]==13) {
            if (
$bbuserinfo['usergroupid']==|| $bbuserinfo['usergroupid']==|| $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:


PHP Code:

<!-- 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="$backcolorvalign="top" width="175" nowrap><normalfont>$username</normalfont></td>
    <
td bgcolor="$backcolorvalign="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

Quote:

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

Quote:

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.
Quote:

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

Code:

$posts=$DB_site->query("
        SELECT IF(post.userid=0,post.username,user.username) AS username,
        post.pagetext,post.allowsmilie,post.userid,usergroupid 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

Code:

$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?

Code:

  $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/showthrea...821#post267821

Quote:

Originally posted by Voltron420
I'm getting the exact same errror.

Voltron420 07-20-2002 10:13 AM

Quote:

Originally posted by Boofo
The answer is here. Enjoy! :)

https://vborg.vbsupport.ru/showthrea...821#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?"

dwh 08-10-2002 06:22 AM

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? :)

Quote:

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>&nbsp;&nbsp;<smallfont><i>Admins and Mods can view the post but nobody else does:</i><br>&nbsp;<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


All times are GMT. The time now is 04:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01454 seconds
  • Memory Usage 1,911KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete