Version: 1.00, by intellected
Developer Last Online: Apr 2002
Version: 2.2.x
Rating:
Released: 02-21-2002
Last Update: Never
Installs: 9
Is in Beta Stage
No support by the author.
UPDATED!!! AGAIN!
This is a more effective solution than the standard "ban", and is meant to be used for very annoying troublemakers that keeps re-registering once banned. Anyway - once a user is placed under the "Hellban", the following happens:
1. Every 3:d time the user tries to load a page, he is greeted with a fake "500 Internal Server Error" message.
2. Nobody but moderators and the user himself can see his posts. He is, essentially, under a site-wide ignore.
This may not be a 100% fail-safe solution, but a lot of the morons will hopefully get tired and go away.
Here is how it's done:
1. Run the following query on your database:
INSERT INTO usergroup VALUES("666","Hellban","","0","1","1","1","1","0", "1","0","0","0","1","1","1","1","0","0","1","1","1 ","0","0","1","0","0","0","0","0","0","0","0","1") ;
ALTER TABLE post ADD hellban INT UNSIGNED;
ALTER TABLE thread ADD hellban INT UNSIGNED;
2. Add this at the bottom of you global.php
PHP Code:
if ($bbuserinfo[usergroupid] == 666) {
$randnum = mt_rand(1,3);
if ($randnum == 1) {
header("HTTP/1.0 500 Internal Server Error");
exit;
}
}
3. Find this in newreply.php:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
REPLACE it with this:
PHP Code:
if ($bbuserinfo[usergroup] == 666) {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,hellban) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible','$bbuserinfo[userid]')");
} else {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
}
4. find this in newthread.php
PHP Code:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");
PHP Code:
if ($bbuserinfo[usergroup] == 666) {
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach,hellban) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount','$bbuserinfo[userid]')");
} else {
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");
}
in that file, also find this:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
PHP Code:
if ($bbuserinfo[usergroup] == 666) {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,hellban) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1','$bbuserinfo[userid]')");
} else {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
}
After that, find this:
PHP Code:
if ($visible==1) {
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
}
and replace with this:
PHP Code:
if ($visible==1 && $bbuserinfo[usergroup] != 666) {
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
}
I showthread.php, find this:
PHP Code:
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage ");
Replace with this:
PHP Code:
if ($bbuserinfo[usergroupid] == 666 || ismoderator($forumid)) {
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1 AND post.hellban = '$bbuserinfo[userid]'
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage ");
} else {
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1 AND post.hellban = NULL
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage ");
}
in forumdisplay.php, find this:
PHP Code:
$getthreadids=$DB_site->query("
SELECT
".iif($sortfield=="voteavg",$votequery,"")."
thread.threadid
FROM thread
WHERE thread.forumid = $foruminfo[forumid] AND thread.sticky=0
AND thread.visible=1
$datecut $limitothers ORDER BY sticky DESC, $sortfield$sqlsortorder LIMIT ".($sel_limitlower-1).",$perpage");
Replace that with this:
PHP Code:
if ($bbuserinfo[usergroup] == 666) {
$getthreadids=$DB_site->query("
SELECT
".iif($sortfield=="voteavg",$votequery,"")."
thread.threadid
FROM thread
WHERE thread.forumid = $foruminfo[forumid] AND thread.sticky=0
AND thread.visible=1
AND thread.hellban = NULL
AND thread.hellban = '$bbuserinfo[userid]'
$datecut $limitothers ORDER BY sticky DESC, $sortfield$sqlsortorder LIMIT ".($sel_limitlower-1).",$perpage");
} else {
$getthreadids=$DB_site->query("
SELECT
".iif($sortfield=="voteavg",$votequery,"")."
thread.threadid
FROM thread
WHERE thread.forumid = $foruminfo[forumid] AND thread.sticky=0
AND thread.visible=1
$datecut $limitothers ORDER BY sticky DESC, $sortfield$sqlsortorder LIMIT ".($sel_limitlower-1).",$perpage");
}
Now, whenever you want to get rid of a user, simply set him or her to usergroup Hellban.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
INSERT INTO usergroup VALUES(\"666\",\"Hellban\",\"\",\"0\",\"1\",\"1\", \"1\",\"1\",\"0\",\"1\",\"0\", \"0\",\"0\",\"1\",\"1\",\"1\",\"1\",\"0\",\"0\",\" 1\",\"1\",\"1\",\"0\",\"0\",\" 1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\ ",\"1\");
ALTER TABLE post ADD hellban INT UNSIGNED;
ALTER TABLE thread ADD hellban INT UNSIGNED;
MySQL said: Column count doesn't match value count at row 1
Originally posted by intellected
How very wierd - the query is the exact same that I used when inserting it. Anyway, it's not really complicated to circumvent:
Just create a new usergroup, and then go into phpmyadmin and change the groupid to 666.
i dont have phpmyadmin. i actually didnt know how to run query's until i got that hack for the vbb admin cp. is their any other query i can run to make it work, cause i got the same problems as others and clueless on this. btw, sounds like a good hack.
i dont have phpmyadmin. i actually didnt know how to run query's until i got that hack for the vbb admin cp. is their any other query i can run to make it work, cause i got the same problems as others and clueless on this. btw, sounds like a good hack.
Seriously man, this is indeed the EXACT query I use:
Code:
INSERT INTO usergroup VALUES("666","Ultimate ban","","0","1","1","1","1","0","1","0","0","0","1","1","1","1","0","0","1","1","1","0","0","1","0","0","0","0","0","0","0","0","1");
And it works flawlessly on vB 2.2.2. I have no idea why it doesn't work for you. Anyone got any ideas?