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.
If you are to delete aged warnings (and I believe one should do that), the task is a bit more involved than just deleting the warnings themselves. I believe that you should also reduce the points the member has accumulated, until that time, by the number of points associated with the warning you delete.
I tried to do such a thing, but it gets too complicated for my knowledge of queries. You have to fetch the user id, then go to the warnings table, get the warned_warning_id and from their find how many points are associated with this warning type and subtract these points from the user table. If you can do that, I guess you are solving one of the major issues with this hack.
And of course, the un-banning script will be a welcome improvement too.
Some people (me included) had expressed the hope that the PM send to the members when they are warned, is formed by an easy-to-adapt template. Well, I've managed to do it, so here are some details:
In Warn.php, find :
PHP Code:
$messageb="You have been warned for one of your posts: [url={$vboptions[bburl]}/showthread.php?p={$_POST['post']}]click here to see it[/url]. Your warning level is now: {$level}. Click on the [b]Quick Links[/b] menu above and select [b]View Your Warnings[/b], to see details about all the warnings you have received. The person who warned you, entered this comment: [i]{$_POST['comment']}[/i]. Please reply back if you have a dispute.";
$messageb=ParseInput($messageb);
Then create a template named "warn_pm" and inside it use the followings:
PHP Code:
Dear $user[username],
You have been warned for one of your posts, which violated the Forums Rules.
The reason you have been warned is because [b][i] $warn_type[warn_desc] [/i][/b](Warning Type = $warn_type[warn_name]), for which you have been given [b] $warn_type[warn_points] [/b] point(s).
The post for which you are warned can be seen [URL="$vboptions[bburl]/showthread.php?p=$_POST[post]"]here[/URL].
The person who warned you, entered this comment:
[i]$_POST[comment][/i]
Your total Warning Level at the moment is: [b] $level [/b] point(s).
If you reach the maximum of [b]$warn_options[points_before_banned][/b], you will be banned from the Forums, for [b]$warn_options[banned_limit][/b] days.
To see details about all the warnings you have received, until now, please click [URL="$vboptions[bburl]/Warn.php?do=ViewMyWarnings"]here[/URL].
After a lot of trial-and-error, I've managed to improve on Jag's script above.
The script below, will test every warning to see if it is more than a month old. If it is, it will erase the warning and reduce the points of the member by the number of points that warning had.
One question Jag, that number you used, $date = $today-240800, the 240800, where does it come from? I believe that it should be $date = $today-2592000 (for 30 days x 24 hours x 60 minutes x 60 seconds).
Here is my script:
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vB3 Warn System V1 By Zero Tolerance [http://gzevolution.net] ||
|| #################################################################### ||
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'kill_warns');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// Global Requirements & Functions
require_once('./global.php');
require_once('./includes/functions_user.php');
$DB=$DB_site; // What? Its easier to write ^_^;
$warn_page=""; // Template Var
$today = time();
$date = $today-2592000;
$warn=$DB->query("select w.*,wt.*,u.* from ".TABLE_PREFIX."warnings w left join ".TABLE_PREFIX."warning_types wt on(wt.tid=w.warned_warning_id) left join ".TABLE_PREFIX."user u on(u.userid=w.warned_user)");
$DB->query("update ".TABLE_PREFIX."user set warning_level='{$level}' where userid='{$warns['userid']}'");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "warnings WHERE wid='{$warns['wid']}'");
}
}
log_cron_action('Old Warnings deleting script was run', $nextitem);
Who all have access to warn? Can super moderators and moderators have access?
I do not use supermoderators. The way mine is set up, is that moderators can always see the "View XYZ's warnings". They see the "Warn XYZ" only in the forums they moderate. Admin sees both links everywhere. User sees only "View my warnings" in his own posts, but other users can see his overall warning points in his posts.
I do not use supermoderators. The way mine is set up, is that moderators can always see the "View XYZ's warnings". They see the "Warn XYZ" only in the forums they moderate. Admin sees both links everywhere. User sees only "View my warnings" in his own posts, but other users can see his overall warning points in his posts.
Rgds
Is that default? I want moderators to only have access for the forums they moderate. Something else that would be nice is to be able to add it to postbit such as:
Is that default? I want moderators to only have access for the forums they moderate. Something else that would be nice is to be able to add it to postbit such as:
That way users will know to view warnings or not.
This is what I have, yes, you can show the warning points in the postbit.
Now if you were logged in as a user, in your posts, you would also see the "View my warnings" link too.
Word of caution. After all the customization I've done to this hack, I am not sure of what comes with it and what I added. So please take my response as a "yes, in my case.".