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)

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 09:58 AM.

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.01222 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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