vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Mike's Warning System 1.0 (https://vborg.vbsupport.ru/showthread.php?t=53596)

proxyMX 07-11-2003 02:06 AM

i love this hack
used it to ban a hacker. not a vb hacker a bad guy "mess up your site" hacker

Tenpit 07-11-2003 07:01 AM

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?

Beorn 07-11-2003 02:27 PM

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.

kimbers 07-11-2003 02:49 PM

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?

Tenpit 07-12-2003 06:47 AM

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.

Beorn 07-12-2003 01:08 PM

Harumph....another bug! :(

Yeah....I'm gonna update the files in a second....

Tenpit 07-12-2003 01:21 PM

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.

Oblivion Knight 07-12-2003 01:42 PM

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!

Shepski 07-15-2003 08:36 AM

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?

Tenpit 07-15-2003 01:18 PM

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


All times are GMT. The time now is 07:06 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.01208 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete