Private
04-01-2004, 10:00 PM
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:
$subject=censortext($subject);
In the line above it, place:
// 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:
if ($logip==1 or $logip==2) {
In the line above it, place:
// 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.f orumid 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:
makenavselect("Users");
add below it:
// ***
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:
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!
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:
$subject=censortext($subject);
In the line above it, place:
// 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:
if ($logip==1 or $logip==2) {
In the line above it, place:
// 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.f orumid 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:
makenavselect("Users");
add below it:
// ***
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:
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!