Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mike's Warning System 1.0 Details »»
Mike's Warning System 1.0
Version: 1.00, by Beorn Beorn is offline
Developer Last Online: Feb 2006 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-30-2003 Last Update: Never Installs: 66
 
No support by the author.

Hello all. This is a sort of alternative to g-force2k2's Warnings System Hack. He gets all credit for the idea.

Before anyone starts to accuse me of trying to steal his glory, let me explain. The admin of a well sized board that I super-mod asked me to revise g-force2k2's warning system (it was already installed). I downloaded it, looked through it, and decided that I couldn't: he requested that people respect his hack, and not modify it. So, I didn't, and decided to take a swing at it. Since people don't like change, I made it look the same as the original, but work differently.

Features:
  • Expireable warnings. Each warning type has a default length and value. (can turn this off too)
  • Warning values can be selected by issuer as per severity of the offense. This can be disabled by the administrator; the default value of warning will be used.
  • Warning lengths can be selected by issuer as per severity of the offense. This can be disabled by the administrator; the default length of warning will be used.
  • Relatively quick install: a few file mods, template mods, and then running a script.
  • Email on warning option (Never, Issuer's choice, Always)
  • PM on warning option (Never, Issuer's choice, Always)
  • Email on banning option (yes, no)
  • Changeable banning threshold
  • Which usergroups can warn, which can view the sum, which can view all the warnings
  • Mostly template driven
  • Add, remove, edit warnings
  • Add, remove, edit warning types
  • Stronger admin interface.

That's all I can think of now....

Stats:
  • Queries added per page: 0
  • Queries modified: 3 (indirectly: $templatesused needs to be modified)
  • Queries extra per day: 3+ceil(TheNumberOfUsersWithPointsExpiringToday/10)
  • Files to modify: 3
  • Files to add: 3
  • Install time: 10-15 minutes

Stipulations
  • Support requests will take a bit (a day or two) to reply due to a somewhat tight schedule.
  • Please click Install if you use it
  • DO NOT install this if you have g-force2k2's hack in place. USE THE UPGRADE if you have g-force2k2's hack installed

The package is attached. Screenshots are zipped next. Please click install if you use it.

If you are upgrading from g-force2k2's verison, use MWS-Upgrade.txt, and warn-upgrade.php.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 07-11-2003, 02:06 AM
proxyMX's Avatar
proxyMX proxyMX is offline
 
Join Date: Jun 2002
Location: Seven of Nine is hot! :do
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i love this hack
used it to ban a hacker. not a vb hacker a bad guy "mess up your site" hacker
Reply With Quote
  #43  
Old 07-11-2003, 07:01 AM
Tenpit Tenpit is offline
 
Join Date: Mar 2002
Location: UK
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With this hack installed it is now possible to warn a user more than once for the same post.

Would it be possible for the Add Warning link not to be displayed once a warning has already been added for that post? or at least make it not possible to warn for the same post more than once, with multiple moderators a single post can rack up the points when everyone warns for it.

Also, everytime a warning is issued, in the notification message it shows the warning will expire on Never, no matter what duration is entered, it allways says Never. This is only in the message, the actual warning does expire when it is supposed to.

Any suggestions?
Reply With Quote
  #44  
Old 07-11-2003, 02:27 PM
Beorn Beorn is offline
 
Join Date: Jun 2002
Location: Long Island, NY
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 11:06 PM proxyMX said this in Post #41
i love this hack
used it to ban a hacker. not a vb hacker a bad guy "mess up your site" hacker
Then you're using it for something far beyond the scope of it's purpose.

Quote:
With this hack installed it is now possible to warn a user more than once for the same post.
That's intended. Occasionally someone may go back and make it more offensive. Some people also like to split up the warnings: i.e. one for 'racial slurs' and one for 'vulgar language'...

Quote:
Would it be possible for the Add Warning link not to be displayed once a warning has already been added for that post? or at least make it not possible to warn for the same post more than once, with multiple moderators a single post can rack up the points when everyone warns for it.
Yes, however, it would require editting the query that gets the post, as well as the code added in for showthread.

Quote:
Also, everytime a warning is issued, in the notification message it shows the warning will expire on Never, no matter what duration is entered, it allways says Never. This is only in the message, the actual warning does expire when it is supposed to.
Any suggestions?
One of two things I can think of:
  1. Go to the options, go to Warning Expiration, and make sure "Always Expire" or "Issuer's Choice" is selected. If they already are, go to step 2...
  2. Go to each warning, and see if they're all set to expire never. If they are, or most are, go to the options, and make sure Moderator Overide defaults is set to yes, or change the default length of the warnings.
Reply With Quote
  #45  
Old 07-11-2003, 02:49 PM
kimbers kimbers is offline
 
Join Date: Jul 2003
Location: N.C.
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 08:29 PM Beorn said this in Post #40
Did you modify showthread.php as per the instructions?
Yes i did i followed the instructions to the letter.

Im wondering if i should just place a link there instead of useing the templates?
Reply With Quote
  #46  
Old 07-12-2003, 06:47 AM
Tenpit Tenpit is offline
 
Join Date: Mar 2002
Location: UK
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Tenpit wrote:
Also, everytime a warning is issued, in the notification message it shows the warning will expire on Never, no matter what duration is entered, it allways says Never. This is only in the message, the actual warning does expire when it is supposed to.
Any suggestions?


--------------------------------------------------------------

Yesterday at 04:27 PM Beorn said this in Post #43
One of two things I can think of:
  1. Go to the options, go to Warning Expiration, and make sure "Always Expire" or "Issuer's Choice" is selected. If they already are, go to step 2...
  2. Go to each warning, and see if they're all set to expire never. If they are, or most are, go to the options, and make sure Moderator Overide defaults is set to yes, or change the default length of the warnings.
Found the problem in warn.php

Find
Code:
		if($length = -1) {
			$end_date = "never";
		}
Replace with
Code:
		if($length == -1) {
			$end_date = "never";
		}
So must be affecting everyone else that has installed this hack.

Nice work btw, i like it a lot.
Reply With Quote
  #47  
Old 07-12-2003, 01:08 PM
Beorn Beorn is offline
 
Join Date: Jun 2002
Location: Long Island, NY
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Harumph....another bug!

Yeah....I'm gonna update the files in a second....
Reply With Quote
  #48  
Old 07-12-2003, 01:21 PM
Tenpit Tenpit is offline
 
Join Date: Mar 2002
Location: UK
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 04:27 PM Beorn said this in Post #43
That's intended. Occasionally someone may go back and make it more offensive. Some people also like to split up the warnings: i.e. one for 'racial slurs' and one for 'vulgar language'...
With multiple mods i really didn't want them warning the same user for the same post because they hadn't checked to see if there was already a warning.

So i did the following.

In warn.php find:
Code:
		} elseif($towarn['warninglvl'] >= $WarnBanThreshold) {
			standarderror("Sorry, but that user already has $WarnBanThreshold points or more.");
		}
Add the following after it:
Code:
		$checkwarn = $DB_site->query_first("SELECT postid FROM warning WHERE postid='$postid'"); 
		if($checkwarn[postid] != "" && $confirmwarn != 1) { 
  			eval("standarderror(\"".gettemplate('warn_alreadywarned')."\");"); 
 			  exit; 
			}
		$confirmwarn = 0;

Create a new template called warn_alreadywarned with the following contents:
Code:
This user has already has a current warning for this post.

Do you <B>really</b> want to warn this user again for the same post?
<br><br>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td align="left"><smallfont>
	<a href="warn.php?s=$session[sessionhash]&action=new_warning&confirmwarn=1&postid=$post[postid]">[Continue with Warning] </a></smallfont></td>
<td align="right"><smallfont>
                <a href="javascript:history.back(1)"> [Back to Thread]</a></smallfont></td></tr></table>
This checks to see if a post has already been warned when you click new warning. If it has, it presents you the option to continue with a new warning for the same post, or not.
Reply With Quote
  #49  
Old 07-12-2003, 01:42 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice little addon Tenpit..
I may give it a whirl. I have staff that are eager to press the warn button, and ocasionally a user ends up warned twice for the same post..

Thanks for the bugfix too!
Reply With Quote
  #50  
Old 07-15-2003, 08:36 AM
Shepski Shepski is offline
 
Join Date: Jul 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack. installed with no problems. just one point tho, when the system emails out the user to tell them they have been naughty the subject line is empty. this causes a problem for me as my mail server blocks any mail with a blank subject line. can I hardcode a subject line in and if so where as its obviously not picking up the template for subj?
Reply With Quote
  #51  
Old 07-15-2003, 01:18 PM
Tenpit Tenpit is offline
 
Join Date: Mar 2002
Location: UK
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:36 AM Shepski said this in Post #49
great hack. installed with no problems. just one point tho, when the system emails out the user to tell them they have been naughty the subject line is empty. this causes a problem for me as my mail server blocks any mail with a blank subject line. can I hardcode a subject line in and if so where as its obviously not picking up the template for subj?
In warn.php find 2 occurrences of:
Code:
eval("\$mailed = vbmail(\"".addslashes($towarn['email'])."\",\"".addslashes($subject)."\",\"".addslashes($msg)."\");");
Replace both, with:
Code:
eval("\$mailed = vbmail(\"".addslashes($towarn['email'])."\",\"".addslashes($subj)."\",\"".addslashes($msg)."\");");
Reply With Quote
Reply


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 04:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04678 seconds
  • Memory Usage 2,325KB
  • 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
  • (7)bbcode_code
  • (8)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
  • (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