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


All times are GMT. The time now is 02:23 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.02079 seconds
  • Memory Usage 1,753KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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