Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Warning Hack V1.5 Details »»
Warning Hack V1.5
Version: 1.00, by Zero Tolerance Zero Tolerance is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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.

Comments
  #182  
Old 08-09-2004, 03:03 AM
Jag Jag is offline
 
Join Date: Aug 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AWESOME HACK!!!

Installed quickly and easily, and works WONDERFULLY!


* Clicks Install
Reply With Quote
  #183  
Old 08-09-2004, 03:51 AM
Jag Jag is offline
 
Join Date: Aug 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I've made a little script that should go through and delete any warns that are more then a month old

Simply upload this script to your webserver, and set up a Scheduled Task (in your vB AdminCP) to run it once a day
Reply With Quote
  #184  
Old 08-09-2004, 06:27 AM
Snatch Snatch is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, but i need a Script that unbann all Banned user after the Bantime.
Reply With Quote
  #185  
Old 08-09-2004, 06:28 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am afraid this is not as simple as that.

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.

Rgds
Reply With Quote
  #186  
Old 08-09-2004, 08:31 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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); 
Replace these lines with :

PHP Code:
eval('$messageb = "' fetch_template('warn_pm') . '";'); 
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 postswhich 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] [/bpoint(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 youentered this comment

[
i]$_POST[comment][/i]

Your total Warning Level at the moment is: [b$level [/bpoint(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][/bdays.

To see details about all the warnings you have receiveduntil nowplease click [URL="$vboptions[bburl]/Warn.php?do=ViewMyWarnings"]here[/URL].

Please reply back if you have a dispute
I hope this helps.

Rgds
Reply With Quote
  #187  
Old 08-09-2004, 11:11 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)");

while(
$warns=$DB->fetch_array($warn))
{
// update user's warn level
if (vbdate($vboptions['dateformat'], $warns[warned_time]) == vbdate($vboptions['dateformat'],$date)) 
{
$level=($warns['warning_level']-$warns['warn_points']);
$level=(int)$level;
if(
$level<1){$level=0;}

$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);

?>
Rgds
Reply With Quote
  #188  
Old 08-10-2004, 05:09 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Who all have access to warn? Can super moderators and moderators have access?
Reply With Quote
  #189  
Old 08-10-2004, 05:19 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lifesourcerec
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.

Rgds
Reply With Quote
  #190  
Old 08-10-2004, 05:24 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
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:

Quote:
Join Date:
Posts: 200
Warnings (0)
Feedback: 10
That way users will know to view warnings or not.
Reply With Quote
  #191  
Old 08-10-2004, 05:41 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lifesourcerec
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.

To see how mine looks like go to:

http://forum.m1911.org/showthread.php?t=597

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.".

Thanks
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10227 seconds
  • Memory Usage 2,353KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete