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)

Beorn 05-30-2003 10:00 PM

Mike's Warning System 1.0
 
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.

Beorn 05-31-2003 02:53 AM

Screenshots:

Showthread admin or mod view (may change as per your settings)
Add warning
View User warnings
Warning list
ACP Options
ACP Add Warning Type
ACP View Warnings
ACP View Warning List

MentaL 05-31-2003 11:55 AM

looks good. may use it in future

TomokiG 05-31-2003 02:57 PM

Quote:

Today at 01:55 PM mentalrz said this in Post #3
looks good. may use it in future
Same here... just now I got g-force2k2's hack installed... perhaps I'll patch it myself ^^

?TomokiG?

Oblivion Knight 05-31-2003 05:22 PM

This has a GREAT amount of potential, I love the expiry idea.
I may well revert to this from g-force2k2's version.

Quote:

Today at 04:50 AM Beorn said this in Post #1
If there are enough requests, I'll make a conversion script.

[high]* Oblivion Knight requests a conversion script.[/high]

Koutaru 05-31-2003 05:57 PM

The expiry idea is great! I was going to install the original warnings system but it wasn't quite like what I was looking for. I think this is though -- as long as it's proved stable ;)

TomokiG 05-31-2003 10:40 PM

Just now I've finished translating and integrating the hack after deinstalling the old one ^^... although I had to retype the old warnings...

And I've to admit... this hack ist much better than the "original" one... Big THX...

°TomokiG°

N9ne 05-31-2003 11:52 PM

This looks great, I thought about doing the same thing.

However I'll do the same thing with more for vB3 when its out if I have enough time :D

I've put all my hacking on hold now until vB3, I just can't wait for it...so I can hack it to pieces :D

Link14716 06-01-2003 12:14 AM

I have installed this, however, the warn link is not showing up anywhere. Yes, I have followed the instructions to a T, but it is still not working correctly...

EDIT: Damn all these master switches that default to off! ;)

Link14716 06-01-2003 12:29 AM

I found one error. In getinfo, the link to view warnings is wrong (the userid is missing) since it uses $post[userid]. To fix this, and have it work in both the postbit and in getinfo, open up member.php.
Find:
PHP Code:

        if(in_array($bbuserinfo['usergroupid'],$WarnUserGroupsView)) { 

Add Under:
PHP Code:

            $post['userid'] = $userinfo['userid']; 

Thanks for this great hack, Beorn!

EDIT: Also, you forgot to add the header to the new warning page, making it look terrible. To fix this, edit your warn_newwarn template.
Find:
Code:

<body>
Add Under:
Code:

$header

Erwin 06-01-2003 06:03 AM

Looks good. I've got gforce2k's one installed too, but this one looks nice. :) Well done.

PixelFx 06-01-2003 08:20 AM

sounds great, thanks for sharing :) I've currently got geforce2k's install. I'll prob stick with that for now. However great work non the less :)

dapence 06-01-2003 08:28 AM

Mike did indeed do great job at the task of what I thought was a much needed replacement for g-force2k2's warning system we installed on our site. Thanks Again, Mike. :D

Beorn 06-01-2003 04:28 PM

Quote:

Yesterday at 09:29 PM Link14716 said this in Post #10
I found one error. In getinfo, the link to view warnings is wrong (the userid is missing) since it uses $post[userid]. To fix this, and have it work in both the postbit and in getinfo, open up member.php.
Find:
PHP Code:

        if(in_array($bbuserinfo['usergroupid'],$WarnUserGroupsView)) { 

Add Under:
PHP Code:

            $post['userid'] = $userinfo['userid']; 



Eeep...I made that fix to the beta site (see 'dapence' above ;)), but I forgot to add it into the install file...I'll update it in a minute...

Quote:

Thanks for this great hack, Beorn!
Thanks!

Quote:

EDIT: Also, you forgot to add the header to the new warning page, making it look terrible. To fix this, edit your warn_newwarn template.
Find:
Code:

<body>
Add Under:
Code:

$header

Actually, I meant to leave it out...IMO it looks better....But you can put/leave it in if it so pleases you....

A conversion script will take a few days not only because I need to set up both hacks, but also because I need time to...I'm guessing about a week....

Link14716 06-01-2003 04:55 PM

Quote:

Today at 01:28 PM Beorn said this in Post #14
Actually, I meant to leave it out...IMO it looks better....But you can put/leave it in if it so pleases you....
Trust me, the style that I use doesn't look right without the header. ;) Oh well, I added it anyways. :)

Oblivion Knight 06-03-2003 02:19 PM

Quote:

06-01-03 at 06:28 PM Beorn said this in Post #14
A conversion script will take a few days not only because I need to set up both hacks, but also because I need time to...I'm guessing about a week....
Looking forward to it.. :)

Beorn 06-04-2003 09:59 PM

It would help if I had the data and structure to the warnings and warnings_log table with g-force2k2's hack installed for a conversion....

Oblivion Knight 06-11-2003 12:01 PM

Quote:

06-04-03 at 11:59 PM Beorn said this in Post #17
It would help if I had the data and structure to the warnings and warnings_log table with g-force2k2's hack installed for a conversion....
[high]* Oblivion Knight thinks you'll need g-force2k2's permission for the data and structure to those tables..
[/high]

I could be wrong.. :speechless:

ernestdefoe 06-13-2003 08:31 PM

Is there a way to change the font and size of the text for the hack?

Reoplex 06-18-2003 12:41 AM

this is a great hack, thanks man :)

sajjid 06-18-2003 12:57 AM

Sajjid requests a conversion script.
:)

sonic3d 06-19-2003 07:32 PM

is this hack stable enuff to use?

l8er
sonic

sajjid 06-23-2003 04:04 PM

in your instruction step 1 you state OPEN global.php
which one ? one in forum dir or admin dir

Beorn 06-25-2003 04:44 PM

Quote:

06-23-03 at 01:04 PM sajjid said this in Post #23
in your instruction step 1 you state OPEN global.php
which one ? one in forum dir or admin dir

All the paths are from the forum root, so that refers to the forum one.

Quote:

is this hack stable enuff to use?
As far as I know, it is. The only

I'm going to send in an update in a minute. What you need to do is replace the files, and go to 'Resum' in the admin panel. That's all.

Now, the conversion script:
After (seemingly) everything that could possibly go wrong in my life, I think I'll have time for that conversion. I'll try to get it out by Friday (I hope).

Mike

Beorn 06-28-2003 01:26 AM

Hello all,

I finally finished that upgrade script. If you have g-force2k2's Warning System (v. 2.0 or higher), you can use the upgrade instructions included in the package posted in the first post of this thread. If you are upgrading, use MWS-Upgrade.txt, and warn-upgrade.php.

I'll ask a mod to move this to the 'Full Releases' forum :).

Thank you everyone for beta testing. Please spread the word, and click Install if you install it. By clicking Install, you will receive updates when I do update it.

Oblivion Knight 06-28-2003 09:15 AM

I've just upgraded from g-force2k2's mod, and so far everything seems to be running well.. :)

Just a little thing i picked up on with the upgrade instructions:
Code:

FIND:
---------------------------------       
<BR>
        $post[warnlink]
---------------------------------       
ADD AFTER IT:
---------------------------------       
$post[warnlink]
---------------------------------       
CLOSE postbit

I'm expecting that should be replace instead of add after, since there'd be no reason for wanting 2 instances of warnlink, and your code seems to add a <br> already.

Also.. I wouldn't recommend doing this step:
Code:

1.        OPEN admin/template.php
        FIND AND REMOVE:
---------------------------------
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
  $only['warn'] = 'Warning System Hack';
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
---------------------------------
        CLOSE admin/template.php

Since it leaves the templates without a category in the Default templates.. ;)

[high]* Oblivion Knight clicks install.[/high]

Beorn 06-29-2003 02:43 AM

Quote:

Today at 06:15 AM Oblivion Knight said this in Post #26
I'm expecting that should be replace instead of add after, since there'd be no reason for wanting 2 instances of warnlink, and your code seems to add a <br> already.
Yearh, it should be...fixed it...

Quote:

Also.. I wouldn't recommend doing this step:
Code:

1.        OPEN admin/template.php
        FIND AND REMOVE:
---------------------------------
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
  $only['warn'] = 'Warning System Hack';
// +++++++ Warning Hack 2.0 [ g-force2k2 ] +++++++
---------------------------------
        CLOSE admin/template.php

Since it leaves the templates without a category in the Default templates.. ;)
Again, my preferences seem different than those of others...I like it without...so I added a note saying that part is optional.

Finally, anyone who ran the upgrade before this post, please run this query, which I seemed didn't paste into the final upgrade file....but I'll do that now.

Code:

DELETE FROM template WHERE title IN('warn_warnlink','warn_viewlink','warn_userinfo','warn_show_warn','warn_show','warn_seelink','warn_redirect_warnsuccess','warn_redirect_userban','warn_pmyes','warn_pmno','warn_pmemail_subject','warn_pmemail_notify','warn_listing','warn_list','warn_Getinfo_warning','warn_error_whywarnself','warn_error_noexist','warn_error_nowarnings','warn_error_noaccess','warn_error_maxwarnlimit','warn_error_emptyreason','warn_error_cantwarngroup','warn_banemail_subject','warn_banemail_notify','warn_add');
*sigh* Screw the wicked...there is no peace unto me...

Oblivion Knight 06-29-2003 04:54 AM

Fair point to make I guess..
Ran the extra query, thanks for your support with this modification :)

sonic3d 06-29-2003 03:51 PM

upgraded flawlessly. thanx.

l8er
sonic

Paris Holley 07-04-2003 04:23 AM

when i add the code

Code:

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

iget unexcept $ on the very last line.......which is after ?> which doesn't exsist

Soundr 07-05-2003 01:23 PM

Hey, I just installed your hack, I have some questions though.

1. When you set a warning, lets say 3 points, and a expiry of 5 days, after 5 days will those warning points go? If this happens, how can I set unlimited days?
2. When you add a warning to teh user, you cannot see the header any more, how can I add the header and footer?

- Devnull

xpguy 07-05-2003 08:49 PM

i cant find the get info template bit :S

4thgenresource 07-06-2003 10:04 PM

Quote:

07-05-03 at 10:49 PM xpguy said this in Post #32
i cant find the get info template bit :S
It's under "User Info Display Templates"

4thgenresource 07-06-2003 10:35 PM

Is there anyway to have, instead of days, also have a certain length of time, like 1 hour, 3 hours, etc..?

4thgenresource 07-07-2003 02:10 AM

Okay I need help now....Whenever I anyone click's on a user's name, or the profile button, we're getting this error:

"Fatal error: Call to undefined function: checkwarnlink() in C:\Sites\BS Forums\member.php on line 1405"

:(

Beorn 07-07-2003 04:26 PM

Paris Holley - It sounds like you added that code, not replaced it.

Soundr - Yeah, the points are eliminated (but the warning remains so you have a rap sheet on the user). For an infinite one, set the default length to -1. As to the header: open the warn_newwarning template. Find <body>, and add after it $header

4thgenresource - Yeah, it's possible to have < 1 day warnings, but there would be a few modifications involved. Also, it sounds like you didn't remove all of g-force2k2's old warning system. Open the upgrade instruction file, and go to step 5. Make sure you've done everything listed.

EWorld 07-08-2003 05:14 AM

Mr. Mike .. umm how would I put

Warning Points: 13 (orwhatever they have) in the postbit?

Like under

POSTS:
POINTS:
WARING POITNS:

- Speedy

Beorn 07-08-2003 02:31 PM

Well, Points and Warning Points are the same thing. To make the change (that I think) you would like, open the postbit template, remove the following (if it is there...it may or may not be depending on how far you got through the installation...)
Code:

| $post[warnlink]
Scroll up a bit in the postbit template, and find
Code:

        Posts: $post[posts]
Add after that:
Code:

<br>$post[warnlink]
Additionally, you may want to edit warn_postbitaddin and add a <br> (line break) between each of $post[warninglvlwords] and $post[viewwarnings] and $post[addwarning].

Mike

kimbers 07-10-2003 09:15 PM

I have a problem and i feel like a dork posting this but, when i add the $post[warnlink] nothing shows up in my templates and i set the warning system to on.

Beorn 07-10-2003 11:29 PM

Did you modify showthread.php as per the instructions?


All times are GMT. The time now is 04:47 PM.

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.01571 seconds
  • Memory Usage 1,850KB
  • 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
  • (12)bbcode_code_printable
  • (4)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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