Version: 1.00, by Private
Developer Last Online: Aug 2007
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==1 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:
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>.
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==1 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.
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
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.
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.