vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Warning Hack V1.5 (https://vborg.vbsupport.ru/showthread.php?t=65336)

Zero Tolerance 05-19-2004 10:00 PM

Warning Hack V1.5
 
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

SmasherMaster 05-20-2004 08:45 PM

Best warning system ever for vB3. Simple install and extremely effective!

/me hits install

EDIT: SCREENIES HERE!

msimplay 05-20-2004 10:00 PM

i have erwins version installed is there a way to easily upgrade from it ?

Zero Tolerance 05-20-2004 10:02 PM

This isnt an upgrade from it im afraid, this is a completely new version

I too had erwins version installed, i just manually removed it by reversing the install steps

Update:
File has been re-uploaded, anyone that installed before this post, just re-download, and re-upload Warn.php

- Zero Tolerance

msimplay 05-20-2004 10:15 PM

on vb2 i had mikes version installed is this hack as good as the vb2 versions

Zero Tolerance 05-20-2004 10:17 PM

No idea, ive never had vb2, lol

But i assure you its all you need for a warning system, imo a lot betetr than Erwins

- Zero Tolerance

msimplay 05-20-2004 10:24 PM

check this please to get what am chatting about ps i'll pm coz i want to know about your rpg an all

https://vborg.vbsupport.ru/showthrea...highlight=mike

wrongful 05-20-2004 10:27 PM

this is really awesome, but what usergroup are users banned into, or can you choose which usergroup they are banned into?

SaN-DeeP 05-20-2004 10:38 PM

screenies please

ryancooper 05-20-2004 10:55 PM

Great hack will be very usefull!!

wrongful 05-20-2004 11:00 PM

ok i see in warn.php they are moved to usergroup 8 by default. I changed this to my banned usergroup.

SmasherMaster 05-20-2004 11:08 PM

Quote:

Originally Posted by msimplay
on vb2 i had mikes version installed is this hack as good as the vb2 versions

Yes, I do believe it's just as good

wrongful 05-20-2004 11:15 PM

one last thing. I have it set to ban my users for 5 days, but when I go to view banned users, it says permenent, and when I use the Unban Banned Users function, it doesn't unban the user who was banned as a result of the warning system

Vivi Ornitier 05-20-2004 11:19 PM

this is just like gforce's good old hack, thanx heaps ZT.

I was wonderin if you could display the warning level on the postbit, you know how i like to do things lol. Muhc quicker to reference the points if you can just see it from the thread. thx heaps for it. Can you make it so members can view warnings but not warn? It's kinda pointless if the members can't see where they are on the wraning scale and all start +++++ing when they are banned.

Edit: I got a database error when issuing a warning.

Code:

Database error in vBulletin 3.0.0:

Invalid SQL: insert into pmtext values ('','1','deathscythehell','You have been warned','You have been warned for the post: Your Post. Your warning level is now: 4. This action was taken for the following reason: tesitng again. Please reply back if you have a dispute. deathscythehell','a:1:{i:1283;s:4:\"Kite\";}','4','1085099169','1','1')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Friday 21st of May 2004 12:26:09 AM
Script: http://forums.squareultima.com/Warn.php
Referer: http://forums.squareultima.com/Warn....83&post=297358
Username: deathscythehell
IP Address: 66.109.201.66

It still gives the warning when i view warnings but it gives that message after i finish warning the user.

drumsy 05-20-2004 11:24 PM

Also, please hurry up and figure out how I can change permissions so those who I specify cannot see the Warn User link!!! :)

drumsy 05-20-2004 11:27 PM

I do have a problem where an exclamation point in the Notification PM is not being parsed correctly.

wrongful 05-20-2004 11:37 PM

Quote:

Originally Posted by drumsy
Also, please hurry up and figure out how I can change permissions so those who I specify cannot see the Warn User link!!! :)

you can replace
Code:

<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[musername]</a> ? <a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[musername]'s Warnings</a>
<if condition="$show['postcount']">? #<a

with

Code:

<if condition="$bbuserinfo['usergroupid'] == '6'"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[musername]</a> ? <a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[musername]'s Warnings</a> ?</if>
  <if condition="$show['postcount']"> #<a


drumsy 05-21-2004 12:12 AM

How can I allow multiple usergroups, Administrators, Moderators, and Super Moderators?

msimplay 05-21-2004 12:40 AM

just guessing but try this

HTML Code:

<if condition="$post[usergroupid]!=6 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[musername]</a> ? <a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[musername]'s Warnings</a> ?</if>

AN-net 05-21-2004 01:27 AM

sounds good, any screenshots?

Zero Tolerance 05-21-2004 01:51 AM

Error on Pm input? Then you have modified the table structure, but no worries, that can be, shall we say, rectified

Find:
PHP Code:

$DB->query("insert into ".TABLE_PREFIX."pmtext values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')"); 

Change To:
PHP Code:

$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')"); 

Screen shots, ill put them in my main post tomorrow

As for unbanning, it only unbans those "auto" banned by the system, and running the unbaned users only unbans those past the time lmit specified when they were banned

- Zero Tolerance

SmasherMaster 05-21-2004 01:58 AM

Ok i've attached some screenies to my first post (right below the first post) to keep you all happy. ;)

Red Blaze 05-21-2004 04:27 AM

Cool, I'll install this tonight and tell you my results.

Oook, I tested this on my test dumby and it works great and all, buuuuut, one small thing.

He doesn't get auto banned. I might of missed something, but once it reaches 5, it stays at five and test (my dumby account) can still post and everything.

EDIT: Ok, I fixed that problem. The thing is usergroup 8 were my RPG Moderators so they were being moved there. I edited warn.php.

PHP Code:

$DB->query("update ".TABLE_PREFIX."user set usergroupid='8',warning_level='{$level}' where userid='{$user['userid']}'"); 

The 8, you change it to any number you want the banned users to be in.

Now, when I click the unban button... they don't move them back to the registered group.

Acido 05-21-2004 07:33 AM

My only Problem, is that Only Admins and Moderators can view the user warnings. I want tha all the users to see it, and all other users (no admin or moderators) are getting the No permission screen :squareeyed:

Help please !

reteep 05-21-2004 09:20 AM

Very nice hack!

A good addition might be if you put in two values. E.g. 5 Warnings -> user is banned for 14 days and ~15 Warnings -> User is permanently banned.

msimplay 05-21-2004 09:30 AM

Quote:

Originally Posted by stormblast
Very nice hack!

A good addition might be if you put in two values. E.g. 5 Warnings -> user is banned for 14 days and ~15 Warnings -> User is permanently banned.

oops just reread the idea
yeh thats a great idea

ie after 5 warnings they get a temporary ban and after 10 warnings a permenant ban
thats an excellent idea

dr1 05-21-2004 12:40 PM

Having the warnings viewable by the user (all) would make this into an awesome hack for me. Thanks for your coding!

VeoMorphine 05-21-2004 12:57 PM

is there a way to display the warning level to all users in the postbit and profile?

msimplay 05-21-2004 01:46 PM

i think all the suggestions so far were options in the old vb2 hacks

with the exception of the idea in this post

Zero Tolerance 05-21-2004 02:32 PM

If you want members to be able to view others warnings, please make this edit within Warn.php

Find:
PHP Code:

if($_GET['do']!='ViewMyWarnings'){
if(!
can_moderate(  )){
print_no_permission(  );
}


Replace With:
PHP Code:

if($_GET['do']!='ViewMyWarnings' && $_GET['do']!='ViewWarnings'){
if(!
can_moderate(  )){
print_no_permission(  );
}


This will result in members seeing the remove link, but they will not have access to use it

Var for warning level in posts?
PHP Code:

$post[warning_level

Simply use that in template postbit or postbit_legacy

Nice suggestions so far, ill include them in version 1.5, keep em coming

- Zero Tolerance

Acido 05-21-2004 04:13 PM

Now all my users can see the warnings.

Thanx ;)

msimplay 05-21-2004 04:24 PM

i thought this might be useful its a list of what was in the warning hacks prior to vb3

Quote:

g-force2k2

Version 2.1?
Comes with the Warning System Settings Inserted Directly into the VBulletin Settings to prevent problems...

Features
// ++++++++++++++++++++
Warnings Hack System (version 2.0)
* Easy Installation / Uninstallation with Warning Installer (includes all queries & templates) [new]
* Now instead of based upon a set warning level it includes seperate distict warning points [new]
* Includes new warning customization for different levels of warning [new]
* Includes new Email Warning feature for regular useage or more importantly pm disabled users [new]
* Ban Limit is now activated once a user's Warning Level is over the configured amount of Warning Points (Not Just Single Warnings) [new]
* Includes New Customizeable Templates [new]
* Emailing and Private Messaging Warning [new]
* Emailing Ban Message [new]
* Warnings Listings [new]
* Includes Viewable List of all Admin Created Warnings for reference to know what is not accepted [new]
* In a sense its a rules hack included with the Warning Hack [new]
* Categorized And Ordered According to Admin Preferences [new]
Warn Config (extremely optimizeable)
* Includes Setable Banned by Warnings usergroup
* Includes Setable Warning Level (maximum warning points)
* Includes Easy Usergroup Configuration For [new]
* Usergroups that can Warn [new]
* Usergroups that can View Warnings [new]
* Usergroups that can view their Warning Levels [new]
* Usergroups that are exempt from warning [new]
* Includes New Warning Functions & Optimizes all Permissions [new]
* Includes Emailing Banning Option [new]
Admin CP Based
* Create Custom Warnings [new]
* Includes Customizeable New Configuration for Different Level Warnings [new]
* Create your own Categories of Warning Levels [new]
* Configure Warning Points to each different Warning [new]
* Includes a list of Warning Logs
* Who warned who?
* Date & Warning Type & Warning Comments [new]
* Post from which warning resulted
* Includes List of All Warned Users
* Includes Warning Point Deductor [new]
* Includes Email Notification after Banning [new]

mikes
* 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

Mijae 05-21-2004 05:38 PM

Quote:

Originally Posted by msimplay
i thought this might be useful its a list of what was in the warning hacks prior to vb3

Excellent hack :D

Osterling 05-21-2004 08:52 PM

is there any reason why i can't run both eriwn and this hack?

msimplay 05-21-2004 10:16 PM

Quote:

Originally Posted by exasko
is there any reason why i can't run both eriwn and this hack?

suppose u can but whats the point of two warning hacks
that would just be a waste of database space

i'd remove erwins the warning link
the rest of the links don't require erwins hack

ap0c 05-21-2004 10:34 PM

g-force2k2's hack was great. I hope this one is just as good.

Vivi Ornitier 05-22-2004 01:36 AM

it most definitely is just as good

Osterling 05-22-2004 03:12 PM

does this come with.. the opition to make a member post all invisble?

WEForums 05-22-2004 04:34 PM

I'm going to install this hack, but not now.

So far, from what I can gather, you're still in the process of updating it. (that's the 'vibe' I'm getting from the replies) Also, I am waiting in hopes that you add the warning points level on the postbit, as on vB2 it was awesome to see and let others see. Saves some hassle.

Mijae 05-22-2004 07:58 PM

A question: will it break the system if I enter decimal numbers? I want to add warnings to lame messages, and make it give like 0.1 points...will it work?


All times are GMT. The time now is 07:43 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.01733 seconds
  • Memory Usage 1,856KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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