vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Thread Banning (Includes Time Banning Feature) (https://vborg.vbsupport.ru/showthread.php?t=50585)

ForKmaN 03-24-2003 05:45 PM

Me too, this hack is great.

VampireMan 03-24-2003 08:17 PM

Ah-hah this will do me nicely :-)

Im installing now :)

Anarchnophobia 03-27-2003 12:02 PM

i?m getting a blank page in admincp too... vb 2.2.9

the rest works fine, thank you :)

LeeCHeSSS 03-28-2003 07:06 AM

Ok, how to hide the quick reply box when a user is reply-banned:

In showthread.php find:
Code:

if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
Right BEFORE that, INSERT:
Code:

$threadban=$DB_site->query_first("SELECT COUNT(DISTINCT banid) AS activeban
                                  FROM bans
                                  WHERE userid=$bbuserinfo[userid] AND threadid=$threadid AND active=1
                                ");

Next, find:
Code:

} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}

and right BEFORE that, INSERT:
Code:

} elseif ($threadban[activeban]!=0) {
        $replybox='';

That's it. And for the query freaks: yes it DOES add a query.

Boofo 03-28-2003 07:21 AM

So, use this code instead of what is in post #16 above? What about the editpost? ;)

LeeCHeSSS 03-30-2003 05:04 AM

This merely hides the quick reply box, smart users could still reply if you do not use the code in post 16.

Anarchnophobia 04-04-2003 07:44 AM

any idea about the blank admin page meanwhile?

Capt PPRuNe 04-19-2003 07:07 PM

Installed the hack but now getting serious problem. The following code added in showthread.php:
PHP Code:

thread.postuserid AS puserid,bans.active AS active

and
PHP Code:

LEFT JOIN thread ON thread.threadid=post.threadid
LEFT JOIN bans ON bans
.userid post.userid AND bans.threadid=post.threadid AND active=

is causing an SQL error whenever trying to read a thread.

This is the error:
PHP Code:

Database error in vBulletin 2.3.0:

Invalid SQL
SELECT
thread
.postuserid AS puserid,bans.active AS active,post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath,
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter

FROM post
LEFT JOIN icon ON icon
.iconid=post.iconid
LEFT JOIN user ON user
.userid=post.userid
LEFT JOIN userfield ON userfield
.userid=user.userid

LEFT JOIN attachment ON attachment
.attachmentid=post.attachmentid
WHERE post
.postid IN (0,810719,812243,812549,812889,837671)
ORDER BY dateline 

mysql error
Unknown table 'thread' in field list

mysql error number1109

Date
Saturday 19th of April 2003 07:56:44 PM
Script
: [url]http://www.pprune.org/forums/forums/showthread.php?s=&threadid=85068[/url] 

I have removed the code for the moment and users can read the forums. Now the 'Thread Ban this user' link is still there and it is possible to ban users using the link. What doesn't happen is the link changing to 'Unban' which means mods who don't have access to the CP can't unban a banned user.

Any suggestions would be helpful.

I did have a problem running the SQL Query. It was generating an error so I ran the query without line breaks and it ran successfully.
:disappointed:

Capt PPRuNe 04-24-2003 11:09 PM

No experts out there that might be able to explain why
PHP Code:

thread.postuserid AS puserid,bans.active AS active

should cause the sql error
PHP Code:

Unknown table 'thread' in field list 

?

I've checked the structure of the tables and they are all ok.

Help! Please, anyone!

Capt PPRuNe 05-03-2003 12:27 AM

Problem fixed. I don't have avatars enabled on my forums and the sql code you wrote assumes that everyone has avatars enabled. No one else has reported this problem because I assume they all have avatars enabled.

If anyone needs the solution make a request on here.


All times are GMT. The time now is 06:14 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.01086 seconds
  • Memory Usage 1,753KB
  • 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
  • (4)bbcode_code_printable
  • (5)bbcode_php_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