Version: 1.00, by Zero Tolerance
Developer Last Online: Nov 2023
Version: 3.0.3
Rating:
Released: 05-19-2004
Last Update: 07-12-2004
Installs: 161
No support by the author.
Version 1.5 Note: You must have v1 installed to upgrade, the upgrade process is small so there was no need to write out a fresh install.
It has come to my attention that a "decent" warning system isn't available here on vbulletin.org, which is quite a shame, and because forums like mine, and probably yours need a simple yet advanced warning system to keep things under wraps
Anyway, i thought i might aswell release what i made, prior to me getting off my ass... lol
Administration Features:
View Warning Logs
- Displays all warnings, warned user, warned by, link to the warned post, date, warning type, and the comment specified when the warning was given, and a remove warning link
(Remove will remove the log and also put the members warning level back down in accordance to how much it was increased by the selected warning removed)
Unban Banned Members
- A simple page that you should visit every few days, it will automatically ban any auto banned users by the warning system where there ban time has expired
Warning Options
- Here you can set the following:
-- Number of warn points before member is auto banned
-- Number of days a member is auto banned for
-- View Warnign Types
-- Add Warning Type
-- Add warning type has the following fields:
---- Name/Description/Warn Points Given
Forum Features:
Every post has "Warn [Name]" and "View [Names] Warnings"
These are only accessiable by a member group which is allowed to "moderate" (Moderating groups are auto detected)
Clicking the Warn link will bring you to a page where you view the user your warning, a link to review the warned post, members current warning level, and below the warning types, has a drop down menu to select the warning type, and a text field to put your comment for why this warning is been issued
Upon completing the warning form, the warned user will be Pm'ed from the person who warned them, with the comment put down and a link to the post
View Warnings link will display logs of only that specified user's warnings, the same features as the admin cp warning logs, only just for this user
Members can access only 1 page of the warning system, which is "View My Warnings", this link is added to the quick links drop down menu
Here they simple view there warnings, just like a moderator would, only without the remove warning link
V1.5 Features:
Protectable Usergroups:
No user's in these defined groups can be warned, or banned.
Root Admin Force Protection:
Userid 1 cannot be warned, canned be banned, this is not optional, this is forced for security.
New Unban Members Set Up:
Now displays all currently banned user's, what time they were banned, what time they are supposed to be unbanned. You may unban the user even if there time has not expired (You will be notificed if they have not served the time issued upon ban, but not stopped). Upon unbanning, you choose the members 'new' warning level and the user's usergroup to move them into
Set banned usergroup:
You can now easily choose from a drop down menu which usergroup user's are sent to if after been warned they are banned.
V1.5 Bug Fixes:
- User locations in 'Users online' shown as unknown if they are warning/viewing warnings (Priority: Medium)
- Unban members system renovated and now fully works (Priotity: Maximum)
- No mysql errors upon sending a pm if the PM table had been altered (Priotity: Maximum)
- New protectable usergroups to stop any group of your choice been banned (Priotity: Maximum)
- Last time visited didn't appear when error page occured (Priotity: Low)
- Un-used global in PM function (Priority: Low)
I hope you enjoy the system, my staff teamare very pleased with it and find it of great use, enjoy the hack
- Zero Tolerance
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
OK, I just installed but there is no clue as to what warning type's (sic) are. Can you do a quick run though of different sample warning types that can possibly be used with this system and how they are configured. It's hard for a new user to create one when it's not explained. You might want to just pre-configure a basic setup so it works out of the box.
I've attached a list of my warning types. Don't worry about the first field in the list, it's generated automatically. The rest of the fields are not displayed properly, this is a text file, but if you follow each row you'll get the proper fields.
In the above instructions I'm able to find that one line of code in my postbit and postbit_legacy templates for my first board style...now I have three more styles...and when I go to look for that first line of code...it does not find that exact line of code...what is finds is this.
Now all three of my other styles have this code in it...just like I qouted...but my first style is just like the instructions line of code.
Is there any reason to have that period or dot or whatever it is in that line of code for the other three styles?
In the original instructions of this hack it is said to find
In refence to the first set of code i posted above ...once this original code is changed...where does this new code come in? Is the original modified code getting overwritten or is it getting put in between the origianl modded code?
Put my code right before that thing about postcount. As for where my code goes in comparison with the original code, the original code does not make any checks, so my code just replaces
Finally, that period is there, to separate the links. Have a look at the forum and you will see "Warn Xyz ? View Xyz's Warnings ? #1", the dot is going in between the links, to separate them.
Unfortunately this won't work for me.
I need to know how to modify the original author's hack to send the email warning.
The only references I can find to PM there are in warn.php
here:
Code:
function SendPM($message,$title,$to,$from){
global $DB;
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'"); // Grab Member Its Going TO
if($from=="BOT"){
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$rpg_option['pmbot']}'"); // FROM Teh Bot =D
} else {
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
}
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$DB->query("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$DB->insert_id().", '{$to['userid']}')");
// Update pm count
$DB->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}
and here:
Code:
// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);
// Redirect
Unfortunately this won't work for me.
I need to know how to modify the original author's hack to send the email warning.
The only references I can find to PM there are in warn.php
here:
Code:
function SendPM($message,$title,$to,$from){
global $DB;
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'"); // Grab Member Its Going TO
if($from=="BOT"){
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$rpg_option['pmbot']}'"); // FROM Teh Bot =D
} else {
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
}
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$DB->query("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$DB->insert_id().", '{$to['userid']}')");
// Update pm count
$DB->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}
and here:
Code:
// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);
// Redirect
Well, if all you want to do, is to replace the PM sending with an e-mail sending, this is the code that sends the e-mail:
PHP Code:
$messageb="";
eval('$messageb .= "' . fetch_template('warn_em') . '";');
$title="You have been warned";
$to=$user['userid'];
if($warn_options['warner']=="")
{
$fromemail=$bbuserinfo['email'];
$fromname=$bbuserinfo['username'];
}
else
{
$warnerdata=$DB->query_first("select username, email from ".TABLE_PREFIX."user where userid='{$warn_options['warner']}'");
$fromemail=$warnerdata['email'];
$fromname=$warnerdata['username'];
}
vbmail($user['email'], $title, $messageb, false, $fromemail, '', $fromname);
The 'if' concerns who sends the e-mail, people have requested that a "hidden warner" is used to send it. If you are not using that functionality, the code should be modified to:
Well, if all you want to do, is to replace the PM sending with an e-mail sending, this is the code that sends the e-mail:
Actually I'd like it to do both so the member has no excuse that he didn't receive a warning. Can I just tack this on after the PM code?
Quote:
The 'if' concerns who sends the e-mail, people have requested that a "hidden warner" is used to send it. If you are not using that functionality, the code should be modified to:
I have this hack installed modification by sv1cec. many thanks for all your worked.
One question:-
in the admincp to view that "View Warning Logs", if I have over 2000 members are warned, will it wait for long time to load the whole page? possibly separate in difference pages, likes 1 page show 20 warns, then go click next page see others.
What are the parameters for this in the database? That mod is not in your instructions. This is all I see in your instrcutions
PHP Code:
Below, please find a description of the tables used: 1. warning_options Field Type Null Key Default Extra oid int(15) PRI auto_increment banned_limit int(15) 0 points_before_banned int(15) 0 banned_usergroup_id int(15) 0 protected_usergroups varchar(255) troll_usergroup_id varchar(10) multiple_per_post char(3) 2. warning_types Field Type Null Key Default Extra tid int(15) PRI auto_increment warn_name varchar(255) warn_points int(15) 0 warn_desc text warn_maturity int(5) 0 warn_permban char(3) 3. warnings Field Type Null Key Default Extra wid int(15) PRI auto_increment warned_user int(15) 0 warned_by int(15) 0 warned_time int(15) 0 warned_reason text warned_post int(15) 0 warned_warning_id int(15) 0
Quote:
Originally Posted by sv1cec
You have to add the send_pm_warning field first, obviously, so install that mod first.
What are the parameters for this in the database? That mod is not in your instructions. This is all I see in your instrcutions
PHP Code:
Below, please find a description of the tables used: 1. warning_options Field Type Null Key Default Extra oid int(15) PRI auto_increment banned_limit int(15) 0 points_before_banned int(15) 0 banned_usergroup_id int(15) 0 protected_usergroups varchar(255) troll_usergroup_id varchar(10) multiple_per_post char(3) 2. warning_types Field Type Null Key Default Extra tid int(15) PRI auto_increment warn_name varchar(255) warn_points int(15) 0 warn_desc text warn_maturity int(5) 0 warn_permban char(3) 3. warnings Field Type Null Key Default Extra wid int(15) PRI auto_increment warned_user int(15) 0 warned_by int(15) 0 warned_time int(15) 0 warned_reason text warned_post int(15) 0 warned_warning_id int(15) 0
You must have picked up the tables description before the mod which has the feature, or I must have screwed up something. In any case, the send_pm_warning is char(3).
I have this hack installed modification by sv1cec. many thanks for all your worked.
One question:-
in the admincp to view that "View Warning Logs", if I have over 2000 members are warned, will it wait for long time to load the whole page? possibly separate in difference pages, likes 1 page show 20 warns, then go click next page see others.
Thanks in advance!!!
rgds,
It doesn't matter how many members you have, iwhat makes the difference is how many warnings you have issued. And yes, as far as I know they will all show in one page (haven't looked in that). Now for paging, I am not sure if my knowledge will allow me to do that, I'll give it a try tomorrow morning. If I'll come up with something, I'll let you know. I'll have to create at least 30 or 40 warnings in my test system to test that, so it might take some time.