Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
Black List Hack 1.0 Details »»
Black List Hack 1.0
Version: 1.00, by Private Private is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 04-01-2004 Last Update: Never Installs: 1
 
No support by the author.

This hack gives you the ability to make a black list of members, those members will not be able to write posts or threads in a certain time limit.


Purpose:

Some members may drive you crazy, tries to write or copy/paste anything just to increase their posts or to say "Hello, I'm here!", I think you're gonna be happy to punish them

Anyway, I made this hack to give you the ability to create a black list, add noisy-users to it, in very simple way, and they won't be to post any reply or thread until a certain time limit finished.

e.g. you can force them not to write more than one post every half hour and one thread every 5 hours, of course you can change these values to whatever you want!

You can, also, decide if you want these limitations to be on each forum "seperately", or on the whole forums, in other words, the first choise will force "John" from posting in "foo" forum until the time limit finished, but he still can post in "bar" forum, so every forum start counting from the time he post in it. While the other choice takes the forums as one unit, so if "John" writes a post in "foo", he won't be able to write in "bar" until the time limit ended.


Usage:

The hack is very easy to use, in the left frame of your control panel you'll find a new group with the name "Black List" after installing the hack, you can add/remove users to/from black list, view black list or tweak the options to fit your needs.


Installation:

PLEASE make a backup of newthread.php, newreply.php and admin/index.php.
For your safety, always make a backup of your files before hacking it!

FIRST:

Upload the files: blacklist.php and install_blacklist.php to the admin directory, then launch install_blacklist.php from the browser, and complete the steps carefully, after that delete install_blacklist.php from your server.

SECOND:

1: Open newthread.php, and find:
PHP Code:
$subject=censortext($subject); 
In the line above it, place:
PHP Code:
    // check banned-users list
    
$blacklist=$DB_site->query("SELECT userid, extra FROM blacklist");
    while (
$blacklist1 $DB_site->fetch_array($blacklist)) {
      if(
$blacklist1[userid]=='9999999') {$threads_ban=$blacklist1[extra]/60;}
      if(
$blacklist1[userid]=='9999998') {$posts_ban=$blacklist1[extra]/60;}
      if(
$blacklist1[userid]=='9999997') {$allforums=$blacklist1[extra];}
      if(
$blacklist1[userid]==$bbuserinfo[userid]) {$blacklisted 1;}
    }
    if (
$blacklisted) {
      
$lastposttime=time()-$threads_ban*60;
      
$forums_where=iif($allforums,"","forumid='$forumid' AND");
      if (
$lastposttime_q=$DB_site->query_first("SELECT threadid FROM thread
      WHERE 
$forums_where postuserid='$bbuserinfo[userid]' AND dateline>$lastposttime")) {
        eval(
"standarderror(\"".gettemplate("error_blacklist")."\");");
        exit;
      }
    } 
2: Open newreply.php, and find:
PHP Code:
if ($logip==or $logip==2) { 
In the line above it, place:
PHP Code:
    // check banned-users list
    
$blacklist=$DB_site->query("SELECT userid, extra FROM blacklist");
    while (
$blacklist1 $DB_site->fetch_array($blacklist)) {
      if(
$blacklist1[userid]=='9999999') {$threads_ban=$blacklist1[extra]/60;}
      if(
$blacklist1[userid]=='9999998') {$posts_ban=$blacklist1[extra]/60;}
      if(
$blacklist1[userid]=='9999997') {$allforums=$blacklist1[extra];}
      if(
$blacklist1[userid]==$bbuserinfo[userid]) {$blacklisted 1;}
    }
    if (
$blacklisted) {
      
$lastposttime=time()-$posts_ban*60;
      
$forums_where=iif($allforums,"","thread.forumid='$forumid' AND");
      if (
$lastposttime_q=$DB_site->query_first("SELECT post.postid,post.threadid,thread.threadid,thread.forumid FROM post,thread
      WHERE 
$forums_where post.userid='$bbuserinfo[userid]' AND post.dateline>$lastposttime AND post.threadid=thread.threadid")) {
        eval(
"standarderror(\"".gettemplate("error_blacklist")."\");");
        exit;
      }
    } 
3: Open index.php that is located in the Admin directory, and find:
PHP Code:
makenavselect("Users"); 
add below it:
PHP Code:
// ***
makenavoption("Add","blacklist.php?action=add","|");
makenavoption("View","blacklist.php?action=view","<br>");
makenavoption("Options","blacklist.php?action=options","<br>");
makenavselect("Black List"); 

THIRD:

Create a new template error_blacklist with the following contents:
Code:
Administrator has limited your posting abilities to:<p>

one thread every $threads_ban minutes.<br>
one post every $posts_ban minutes.<p>

If you feel you got this message by mistake, please <a href="$contactuslink">Contact Us</a>.

Hack Summary:
  • Author: Private (privateman@flashmail.com)
  • Tested on: all versions of vb 2.2.x and 2.3.x
  • Support: post your questions in this thread only


Effects:
  • 1 table created blacklist
  • 1 file added blacklist.php
  • 3 files edited newthread.php, newreply.php, admin/index.php
  • 1 template added error_blacklist

ENJOY!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-02-2004, 03:31 AM
Private's Avatar
Private Private is offline
 
Join Date: May 2002
Location: Saudi Arabia
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to use the hack in an easier way, you can do the following, you will need to enter the users and time limits manually:

1: Open newthread.php, and find:
PHP Code:
$subject=censortext($subject); 
In the line above it, place:
PHP Code:
    // check banned-users list
    
if ($postusername=="user1" || $postusername=="user2" ||
        
$postusername=="user3" || $postusername=="user4") {
    
$hislastpost=time()-18000;
    if (
$hislastpost_q=$DB_site->query_first("SELECT threadid FROM thread 
    WHERE forumid='
$forumid' AND postuserid='$bbuserinfo[userid]' AND dateline>$hislastpost")) {
      eval(
"standarderror(\"".gettemplate("error_blacklist")."\");");
      exit;
      }
    } 
2: Open newreply.php, and find:
PHP Code:
if ($logip==or $logip==2) { 
In the line above it, place:
PHP Code:
    // check banned-users list
    
if ($postusername=="user1" || $postusername=="user2" ||
        
$postusername=="user3" || $postusername=="user4") {
    
$lastposttime=time()-1800;
    if (
$lastposttime_q=$DB_site->query_first("SELECT post.postid,post.threadid,thread.threadid,thread.forumid FROM post,thread 
    WHERE thread.forumid='
$forumid' AND post.userid='$bbuserinfo[userid]' AND post.dateline>$lastposttime AND post.threadid=thread.threadid")) {
      eval(
"standarderror(\"".gettemplate("error_blacklist")."\");");
      exit;
      }
    } 
2: Create the template error_blacklist with the contents:
Code:
Administrator has limited your posting abilities to:<p>

one thread every 5 hours.<br>
one post every half-hour.<p>

If you feel you got this message by mistake, please <a href="$contactuslink">Contact Us</a>.
you don't need to upload any file, no tables modifications are required

however, I strongly encourage you to use the first way because it's more integrated and fully embedded within control panel.

Ciao
Reply With Quote
  #3  
Old 04-02-2004, 04:49 AM
aloha aloha is offline
 
Join Date: Jan 2004
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you make this for 3.0
Reply With Quote
  #4  
Old 04-02-2004, 07:10 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ ditto =)

Looks like a fantastic hack!!
Reply With Quote
  #5  
Old 04-02-2004, 12:53 PM
Red Blaze's Avatar
Red Blaze Red Blaze is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heh, would be great if this was for 3.0. NIce job.
Reply With Quote
  #6  
Old 04-02-2004, 02:33 PM
Stadler Stadler is offline
 
Join Date: Apr 2002
Location: Kiel, Germany
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With vB3 you could do the following:
Add a new group with restricted permissions (e. g. they aren't allowed to post) Select Yes on Usergroup is a banned group (or however its called in english ) and them simply place a time limited ban over them moving them into the restricted group and they will be moved back to their 'old' group, after that time limit has expired.

I haven't tested it myself, but that should do the trick

PS: Don't forget to check their permissions for your private forums unless you want to give them access to one of them
Reply With Quote
  #7  
Old 04-02-2004, 03:04 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this of some use for a small board?
Reply With Quote
  #8  
Old 04-03-2004, 08:38 AM
Private's Avatar
Private Private is offline
 
Join Date: May 2002
Location: Saudi Arabia
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not so familiar with VB3
anyway, I will release a new version of the hack when I get a clear idea about hacking in VB3

Stadler
The hack does another different thing, the hack specifies a certain time limit ( e.g. 5 hours ), so the black-listed user won't be able to post more than a thread/post every 5 hours, and so on.

gmarik
I didn't understand you, please explain
Reply With Quote
  #9  
Old 08-08-2004, 12:18 PM
calvin.krause calvin.krause is offline
 
Join Date: Apr 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Private
I'm not so familiar with VB3
anyway, I will release a new version of the hack when I get a clear idea about hacking in VB3


Stadler
The hack does another different thing, the hack specifies a certain time limit ( e.g. 5 hours ), so the black-listed user won't be able to post more than a thread/post every 5 hours, and so on.

gmarik
I didn't understand you, please explain
any word on getting this set up for vB3??
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12208 seconds
  • Memory Usage 2,330KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (10)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete