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

Blizzb 07-17-2003 01:58 PM

I have this warning system installed and I set warnings to never expire. So after I warn someone, it said "forever" but the next day, it expired. For example: I warned someone on June 15. The next day I find that the warning was to be expired on June 14. And I set it to no expiration. So can anyone help me?

Xyphen 07-17-2003 09:47 PM

this is pretty nice, mind telling us how to install the expiry stuff into g-forces hack? cuz i already got that installed and don't feel like uninstalling and installing urs over again.

drumsy 07-17-2003 10:45 PM

Installed!! Great hack! :)

Oblivion Knight 07-18-2003 06:15 AM

Quote:

Yesterday at 11:47 PM AViO 07 said this in Post #52
this is pretty nice, mind telling us how to install the expiry stuff into g-forces hack? cuz i already got that installed and don't feel like uninstalling and installing urs over again.
Wrong thread to get support for g-force's hack.. ;)
I think that was pretty much the main point of releasing a new version - for the expiry timing, and to clean a few things up template and coding wise.

Blizzb 07-18-2003 01:40 PM

Can anyone answer my question?

Blizzb 07-19-2003 10:33 PM

Somebody please answer my question!!!!

Beorn 07-20-2003 12:57 AM

Please post the warning config in the vBulletin options, as well as the information about the specific warning type you used....

Oblivion Knight 07-20-2003 09:30 AM

Hi again Beorn,
It would appear I've stumbled upon another bug..

When giving someone a warning (in the add new warning window), the "Send a PM" and "Send an e-mail" checkboxes can't be checked.. :eek:

Note that I followed the UPGRADE instructions, and I haven't noticed this bug until now because I haven't needed to warn anyone until now.

Beorn 07-20-2003 12:25 PM

Are you sure it's a bug? Go to the options, and make sure Send E-mail on Warning and Send PM on Warning are set to something other than "Don't Send"

Oblivion Knight 07-21-2003 07:29 AM

Oh right, so because I have them set on "Always Send", they're blanked out, but will always send.. Cool, sorry for the confusion.. :o

Blizzb 07-21-2003 02:12 PM

Here is what happened. In vBulletin options, I checked "Never Expire" for warning points. And I set all warnings length to 0, which means forever. Then I gave someone warning points and it said "forever" in warning length. Then the next day, I found that the warning had expired and the expiration date was the day before the warnings were issued. And when I prolonged the length into 2000 days, and after a day, the warning value decreased. I think this is abug.

partang2 07-26-2003 07:19 PM

Ok, I tried to install this one today, but I'm having some serious trouble here.... The installation did go ok, but the links in the adminpanel and in postbit will not show up at all..!?

I have trippel checked that I have done everything by the book.

Please help me with this one!

Blizzb 08-06-2003 12:49 PM

/me clicks uninstall

Link14716 08-06-2003 02:08 PM

There are bugs. It's a beta. Live with it.

0 doesn't mean forever. Set it to 99999 or something if you want that.

partang2 08-06-2003 04:03 PM

*partang2 clicks uninstall too...

Blizzb 08-06-2003 04:23 PM

Even if you set it to 99999 the warning value decreases. And it's not beta. It's a full release. And this hacker has agreed to provide support for this hack.

Oblivion Knight 08-06-2003 05:04 PM

Quote:

Today at 06:23 PM Blizzb said this in Post #66
And this hacker has agreed to provide support for this hack.
Which doesn't mean they have agreed to sit in front of a monitor all day and keep a watch over the topic 24/7. People do have other commitments than providing support for us at vB.org, please appreciate that.

Be patient and I'm sure your question will be answered in time once somebody finds a fix for your problem.

Beorn 08-06-2003 06:00 PM

Blizzb: -1 means forever, 0 means nothing.

I'm sorry I can't provide instantaneous support. I even wrote in the first post that it may take a few days, or even a week to reply.

partang2: did you go to the options and make sure to turn the warning system on? It's set to off by default in the case you have a weird usergroup setup...

Mike

volitaire 08-08-2003 05:11 PM

for some reason all my mods can change the values of the warnings / times even tho in the admin cp i have it set so they cant overide the defaults.. any ideas?

Beorn 08-08-2003 05:18 PM

:-\

Are they in the normal mod user groups (5 and 7)?

volitaire 08-09-2003 07:31 PM

no.. theyre like 21/24/36/37 etc.. i have like 10 mod groups to seperate different types of mods / users

is there a place somewhere where i can change it? if you have it set to not give full powers to?

Beorn 08-10-2003 03:12 AM

Around line 39, find this:
PHP Code:

if(!$WarnModOverrideDefault && in_array($bbuserinfo['usergroupid'],array(5,7))) { 

Change the array to hold the correct user groups for mods...

volitaire 08-10-2003 03:26 AM

thanks!, i was looking for that but for some reason coudln't see it

Morgalis 08-15-2003 08:40 AM

alright.. i've done some hacking and this crosses over into it

i don't know enough about php to make the confident edits to make this hack work alongside the others

this replacement in showthread.php
PHP Code:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) { 

is this according to the hack
PHP Code:

// Copyright ? 2003 Michael Benza. All Rights Reserved
// [url]http://www.benza.us[/url]

$WarnUserGroups explode(",",$WarnUserGroups);
$WarnUserGroupsView explode(",",$WarnUserGroupsView);
$WarnUserGroupsSum explode(",",$WarnUserGroupsSum);
$WarnUserGroupsUnwarnable explode(",",$WarnUserGroupsUnwarnable);


while (
$post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
    if(
$WarnOnOff) {
        if(
in_array($bbuserinfo['usergroupid'],$WarnUserGroupsSum)) {
            eval(
"\$post['warninglvlwords'] = \"".gettemplate("warn_postbitsum")."\";");
        }
        if(
in_array($bbuserinfo['usergroupid'],$WarnUserGroupsView)) {
            eval(
"\$post['viewwarnings'] = \"".gettemplate("warn_postbitview")."\";");
        }
        if(
in_array($bbuserinfo['usergroupid'],$WarnUserGroups) && !in_array($post['usergroupid'],$WarnUserGroupsUnwarnable)) {
            eval(
"\$post['addwarning'] = \"".gettemplate("warn_postbitadd")."\";");
        }
    
        if(
$post['warninglvlwords'] || $post['viewwarnings'] || $post['addwarning']) {
            eval(
"\$post[warnlink] = \"".gettemplate("warn_postbitaddin")."\";");
        }
    }
// END WARNING SYSTEM! 

what mine really looks like is this
PHP Code:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }

  
$onlinestat "";
  if((
$post[miserable] == 1) || ($post[stunned] & 4)){
    if((
$bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 6) or ($bbuserinfo[usergroupid] == 7)) {
      
$onlinestat "$onlinestat<br><font color=\"red\"><b>Miserable User</b></font>";
    }
  }
  
$post[posts]="$post[posts]$onlinestat"

how do i encorporate the two hacks? i am forgoing this part of miserable users [i LOVE that hack] while i am waiting for some help in this thread

Morgalis 08-15-2003 09:40 AM

youch.. ran into another major problem! o.O

i have commented it all out as i can do without the expiring for the time being

when i add this in following
$header='';
$footer='';
PHP Code:

// ###################### Start Decrease Warning Points ###################### 

i lose my forum style!!

I have vbportal hacked in so this must tie in somewhere.. imagine my surprise when my forums are reverted to the default and no header

i can live without expiring warnings, but i would rather have them

thanks in advance and cheers!

[high]* Morgalis installs.. well most of it anyway ;)[/high]

Beorn 08-15-2003 11:20 AM

Quote:

Today at 05:40 AM Morgalis said this in Post #74
alright.. i've done some hacking and this crosses over into it

i don't know enough about php to make the confident edits to make this hack work alongside the others

how do i encorporate the two hacks? i am forgoing this part of miserable users [i LOVE that hack] while i am waiting for some help in this thread


I'm not sure what the problem is. Change the while line to the about 20 lines provided in the hacking instructions...

drumsy 08-19-2003 10:58 PM

Is there any problems with 2.3.2? I'm trying to install it and it's just bogging my server down!! :(

Oblivion Knight 08-19-2003 11:37 PM

Quote:

Today at 12:58 AM drumsy said this in Post #77
Is there any problems with 2.3.2? I'm trying to install it and it's just bogging my server down!! :(
No problems here on 2.3.2.! :classic:

DeadGaze 08-20-2003 03:05 PM

well done m8...this will come in to very good use

Thank you

drumsy 08-20-2003 04:31 PM

Quote:

Yesterday at 08:37 PM Oblivion Knight said this in Post #78
No problems here on 2.3.2.! :classic:
Very very weird. It spikes my server load up to an insane load when I get it all installed! :(


All times are GMT. The time now is 04:17 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.01481 seconds
  • Memory Usage 1,867KB
  • 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
  • (5)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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