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)
-   -   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/showthread.php?t=71992)

Delphiprogrammi 01-13-2005 06:24 PM

hi,

division by zero errors that's probably because your warnings_options table is empty run this query in phpMyAdmin then set your AWS options and see if it get's saved after that those error messages should disappaer

Code:

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8','','No','3','0','All','No','  No','No','No','No','No','15')
replace "TABLE_PREFIX" with your own ...

pfdc 01-13-2005 06:58 PM

Thanks for the great hack. I installed this hack an now the regular banning which I had befor is not working!! any ideas??

pfdc 01-13-2005 07:42 PM

I am also getting bunch of emails saying that the table warning-options doesnt exsist. I checked in the mysql tables and the table actually exists there. What could be the problem? I get a blank page:

http://persianfootball.com/forums/mo...php?do=banuser

dede1 01-13-2005 07:58 PM

Quote:

Originally Posted by Delphiprogrammi
hi,

division by zero errors that's probably because your warnings_options table is empty run this query in phpMyAdmin then set your AWS options and see if it get's saved after that those error messages should disappaer

Code:

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8','','No','3','0','All','No',' No','No','No','No','No','15')
replace "TABLE_PREFIX" with your own ...

Thanks :)

dede1 01-13-2005 08:45 PM

Is missing warn me like on the picture of that left to that

https://vborg.vbsupport.ru/attachmen...chmentid=21862

sv1cec 01-14-2005 04:28 AM

Quote:

Originally Posted by dede1
Hello

I have these problems(309) :
Warning: Division by zero in /admincp/admin_warn.php on line 665

and

Warning: Division by zero in /admincp/admin_warn.php on line 1856

Dede1,

This is a typical symptom of not having define the lines per page, for the reports, the last field in the Warning Options. First run this query, to see if you have one data line, in your warning_options table:

SELECT * FROM warning_options

If you do have a line there, with the warning options, then go into your admincp and in the warning options. Make sure you enter a value at the last field there.

If you do not have a line in the warning options, run the query below:

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.9', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No','No','No','No','No',' No','15')

Let me know if that solves your problem

sv1cec 01-14-2005 04:33 AM

Quote:

Originally Posted by pfdc
Thanks for the great hack. I installed this hack an now the regular banning which I had befor is not working!! any ideas??

Just make sure that all the changes in banning.php are made correctly. You must have made a mistake there, somewhere.

sv1cec 01-14-2005 04:34 AM

Quote:

Originally Posted by dede1
Is missing warn me like on the picture of that left to that

https://vborg.vbsupport.ru/attachmen...chmentid=21862

Dede1, check your postbit template, if one of the links is there and the other is not, you missed something in your postbit template.

rgds

dede1 01-14-2005 05:00 AM

sv1cec thanks :)

Delphiprogrammi 01-14-2005 04:57 PM

sv1cec,

Slightly offtopic question but i'm gonna ask anyway :ermm: if a member is banned and he trys to login he just get's the "no permission" page not mentioning he's banned i'd like to change that to something "you have have been banned for $time" etc etc you have any idea what phrase i need to edit ?

$vbphrase[nopermission_loggedin] <<-- this one will help

rgds

pfdc 01-14-2005 05:18 PM

Quote:

Originally Posted by sv1cec
Just make sure that all the changes in banning.php are made correctly. You must have made a mistake there, somewhere.

I think I did everything right. here is my banning.php file



any help will be appreciated.

Zachery 01-14-2005 05:31 PM

Never, ever post your vBulletin files at this site or any other, you are breaking the rules of this site as well as the vBulletin License agreement.

Please refrain from doing so again.

sv1cec 01-14-2005 06:48 PM

Quote:

Originally Posted by Delphiprogrammi
sv1cec,

Slightly offtopic question but i'm gonna ask anyway :ermm: if a member is banned and he trys to login he just get's the "no permission" page not mentioning he's banned i'd like to change that to something "you have have been banned for $time" etc etc you have any idea what phrase i need to edit ?

$vbphrase[nopermission_loggedin] <<-- this one will help

rgds

I do not think you should change that phrase. This phrase is used for a special purpose, to tell the user that he used a wrong password or that he visited a page he is not permitted to. What we need to find, is where the ban check is done and change something there. I spend some time trying to figure out, where the ban condition is checked, but couldn't figure it out. I'll look again for that in the morning, 'cause it's 23:00 over here, and I need some rest.

Keep your fingers crossed.

sv1cec 01-14-2005 06:53 PM

Quote:

Originally Posted by pfdc
I think I did everything right. here is my banning.php file



any help will be appreciated.

The changes I make in the banning.php file, are just to add an extra field in the banning form and the userban table of course. It has no real connection to AWS, so restore your original banning.php file and see if it works OK. If it does, then try making the changes again, but with a little more attention.

Rgds

Delphiprogrammi 01-14-2005 07:15 PM

Quote:

Originally Posted by sv1cec
I do not think you should change that phrase. This phrase is used for a special purpose, to tell the user that he used a wrong password or that he visited a page he is not permitted to. What we need to find, is where the ban check is done and change something there. I spend some time trying to figure out, where the ban condition is checked, but couldn't figure it out. I'll look again for that in the morning, 'cause it's 23:00 over here, and I need some rest.

Keep your fingers crossed.


offcourse sv1cec we all need some rest now and then no hurry in it really just thought it would be nice to tell a user he/she is banned and that's the reason he/she can't view anything not the "privileges" thingy

i keep my fingers crossed :nervous:

i'll have a look myself to

Delphiprogrammi 01-14-2005 07:19 PM

Quote:

Originally Posted by pfdc
I think I did everything right. here is my banning.php file



any help will be appreciated.

i've had a problem to editing that file allot of parse errors however i got around it by editing the database querys manually just look at you do not forgot anything like quotes or { } ( ) ; and stuff like that i would give you my working banning.php file but according to this site rules and the vbulletin licence i'm not allowed todo that just edit the file with care and always have an orginal banning.php on a safe please just in case

pfdc 01-14-2005 07:32 PM

Quote:

Originally Posted by Zachery
Never, ever post your vBulletin files at this site or any other, you are breaking the rules of this site as well as the vBulletin License agreement.

Please refrain from doing so again.

I am very very sorry as I didnt know this rule. It will never happen again.

pfdc 01-14-2005 07:48 PM

I uploaded my old file and its working again. Does this in any ways limit the Warning system's capabilities?

Thanks for your help.

Quote:

Originally Posted by sv1cec
The changes I make in the banning.php file, are just to add an extra field in the banning form and the userban table of course. It has no real connection to AWS, so restore your original banning.php file and see if it works OK. If it does, then try making the changes again, but with a little more attention.

Rgds


sv1cec 01-15-2005 04:32 AM

Quote:

Originally Posted by Delphiprogrammi
offcourse sv1cec we all need some rest now and then no hurry in it really just thought it would be nice to tell a user he/she is banned and that's the reason he/she can't view anything not the "privileges" thingy

i keep my fingers crossed :nervous:

i'll have a look myself to

Good morning to all,

although it is definitely not the same, why don't you enable the "e-mail on ban" feature? In that way, when the user is banned, he gets an e-mail and he knows. (I know, I know, I'll look into it, it's just that I haven't have my coffee yet).

Rgds ;-)

Widok 01-15-2005 07:59 AM

Has installed, has created a rule with "Automatic Warnings".
Has written the message with ObsceneWords, I send - there is an error:
Code:

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 1844
At me in this file to this address:
Code:

foreach($nav_array AS $nav_url => $nav_title)
In a window such error:
Code:

Error
An Error Has Occured!
An error has occured, the following message has been left below:

Invalid Warning Type Specified
[ Back ]

Actually the message has gone, the Obscene Words were replaced on *, but the warning to the user has not gone.. :(

mcyates 01-15-2005 12:05 PM

hello, i'm getting this error:

Code:

Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
        hierarchical='Yes',
        automatic='No',
        automaticpm='No',
        autocomments='No',
        warner='0',
        automatic_warner='0',
        collector='',
        banned_limit='7',
        points_before_banned='15',
        warnings_before_banned='',
        banned_usergroup_id='8',
        troll_usergroup_id='14',
        protected_usergroups='6|6|7',
        aprotected_usergroups='6|7',
        restore_groupid='0',
        incr_ban_days='No',
        max_no_bans='2',
        bans_mature='',
        viewoption='All',
        multiple_per_post='Yes',
        send_pm_warning='Yes',
        send_em_warning='Yes',
        email_on_ban='No',
        historical='Yes',
        allowoffpost='Yes',
        warnings_per_page='15'
        where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Saturday 15th of January 2005 01:58:42 PM
Script: http://www.myfootballforum.com/admincp/admin_warn.php
Referer: http://www.myfootballforum.com/admincp/admin_warn.php?act=manageoptions


MentaL 01-15-2005 12:27 PM

Hi im getting this error im mod/banning.php

Quote:

Parse error: parse error, unexpected T_STRING in /home/ragezone/public_html/forum/mod/banning.php on line 258
Why? eveyrthing else works fine. pm me answer please?

properclone 01-15-2005 12:34 PM

Great hack.
Whats annoying is that say someone PMed you with a blocked word in, they get a warning point thing.
If you reply which automatically quotes it will give you a warning point thing yet you didnt swear it was the person who you quoted.

sv1cec 01-15-2005 12:44 PM

Quote:

Originally Posted by mcyates
hello, i'm getting this error:

Code:

Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
        hierarchical='Yes',
        automatic='No',
        automaticpm='No',
        autocomments='No',
        warner='0',
        automatic_warner='0',
        collector='',
        banned_limit='7',
        points_before_banned='15',
        warnings_before_banned='',
        banned_usergroup_id='8',
        troll_usergroup_id='14',
        protected_usergroups='6|6|7',
        aprotected_usergroups='6|7',
        restore_groupid='0',
        incr_ban_days='No',
        max_no_bans='2',
        bans_mature='',
        viewoption='All',
        multiple_per_post='Yes',
        send_pm_warning='Yes',
        send_em_warning='Yes',
        email_on_ban='No',
        historical='Yes',
        allowoffpost='Yes',
        warnings_per_page='15'
        where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Saturday 15th of January 2005 01:58:42 PM
Script: http://www.myfootballforum.com/admincp/admin_warn.php
Referer: http://www.myfootballforum.com/admincp/admin_warn.php?act=manageoptions


Check that you have a collector column in warning_options. If not, added with the following query:

ALTER TABLE warning_options ADD COLUMN collector int(10) unsigned AFTER warner

Remember to add any table prefix if you are using one.

sv1cec 01-15-2005 12:45 PM

Quote:

Originally Posted by mentalrz
Hi im getting this error im mod/banning.php



Why? eveyrthing else works fine. pm me answer please?

Check that you haven't missed a ';' before that line somewhere.

Rgds

sv1cec 01-15-2005 01:11 PM

Quote:

Originally Posted by properclone
Great hack.
Whats annoying is that say someone PMed you with a blocked word in, they get a warning point thing.
If you reply which automatically quotes it will give you a warning point thing yet you didnt swear it was the person who you quoted.

No, this should not happen, because the censored word is replaced by **** in the pm you got. So when you reply, the bad word is not there. However, your post made me find a small problem in that area of the instructions, so please make sure you apply the following edit:

In your private.php file, find:

PHP Code:

                $signature intval($pm['signature']);
                
$iconid intval($pm['iconid']);
                
$disablesmilies iif($pm['disablesmilies'], 01); 

Right after that, add:

[php]
$pm_message=$message;

Then find:

PHP Code:

// insert private message text
                
$DB_site->query("INSERT INTO " TABLE_PREFIX "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" addslashes($bbuserinfo['username']) . "', '$title', '$message', '" addslashes(serialize($tostring)) . "', $iconid, " TIMENOW ", $signature$disablesmilies)"); 

Right before that, add:

PHP Code:

    $message=$pm_message

I'll update the instructions, but all who is using the Automatic Private Warnings from PMs, should do this update.

Rgds

MentaL 01-15-2005 01:26 PM

Thanks, Fixed!

Delphiprogrammi 01-15-2005 07:54 PM

Quote:

Originally Posted by sv1cec
No, this should not happen, because the censored word is replaced by **** in the pm you got. So when you reply, the bad word is not there. However, your post made me find a small problem in that area of the instructions, so please make sure you apply the following edit:

In your private.php file, find:

PHP Code:

                $signature intval($pm['signature']);
                
$iconid intval($pm['iconid']);
                
$disablesmilies iif($pm['disablesmilies'], 01); 

Right after that, add:

[php]
$pm_message=$message;

Then find:

PHP Code:

// insert private message text
                
$DB_site->query("INSERT INTO " TABLE_PREFIX "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" addslashes($bbuserinfo['username']) . "', '$title', '$message', '" addslashes(serialize($tostring)) . "', $iconid, " TIMENOW ", $signature$disablesmilies)"); 

Right before that, add:

PHP Code:

    $message=$pm_message

I'll update the instructions, but all who is using the Automatic Private Warnings from PMs, should do this update.

Rgds


updated right now and don't forget our coffee sv1cec :up:

Delphiprogrammi 01-16-2005 04:02 PM

well,

the bancheck is in /modcp/banning.php instead of the default "print_stop_message()" we could

PHP Code:

<?php
Header
("Location:banned.php");
?>

but it would require a custom template i have no experience with developing that also sv1cec where is the "mail on banned" feature i don't find it :speechless: not in user banning options nor in e-mail options

rgds

sv1cec 01-16-2005 06:33 PM

Quote:

Originally Posted by Delphiprogrammi
well,

the bancheck is in /modcp/banning.php instead of the default "print_stop_message()" we could

PHP Code:

<?php
Header
("Location:banned.php");
?>

but it would require a custom template i have no experience with developing that also sv1cec where is the "mail on banned" feature i don't find it :speechless: not in user banning options nor in e-mail options

rgds

Are you sure it is in banning.php? Because I checked and there is no code which checks whether a user who tries to log in, is in the banned user groups. Unless I am too sleepy right now.

What I am looking for, is the code which accepts the user name, possibly converts it to a user id and then checks whether this id exists in userban. No matter where I looked, I can't find it.

No worries about the message, I can handle that, if only I can find the place where the ban check is made.

As for the Mail when banned, it is in the Member Notification Options, in the AdminCP/Warning System Options.

sv1cec 01-16-2005 07:31 PM

Ok, for the member who asked for a different message, when a banned member tries to log in the site, I have found the place to check it out and produce a different message. I am not releasing it as a new version though, as I want to elaborate on it a bit, but if you are in a hurry to put this into action, here is what you have to do:

Edit file functions.php and find:

PHP Code:

    $postvars construct_post_vars_html();

    
$bbuserinfo['badlocation'] = 1// Used by exec_shut_down();

    
if ($bbuserinfo['userid'])
    {
        eval(
print_standard_error('nopermission_loggedin'true));
    }
    else 

Replace that, with:

PHP Code:

$postvars construct_post_vars_html();

    
$bbuserinfo['badlocation'] = 1// Used by exec_shut_down();

    
    
if (($bbuserinfo['usergroupid']==$warn_opts['banned_usergroup_id'] OR $bbuserinfo['usergroupid']==$warn_opts['troll_usergroup_id']) AND $bbuserinfo['userid'])
    {
        eval(
print_standard_error('nopermission_banned'true));
    }
    
    
    if (
$bbuserinfo['userid'] AND (!$bbuserinfo['usergroupid']==$warn_opts['banned_usergroup_id'] OR !$bbuserinfo['usergroupid']==$warn_opts['troll_usergroup_id'])
    {
        eval(
print_standard_error('nopermission_loggedin'true));
    }
    else 

Also, create a new phrase, named nopermission_banned, its type being Front-End Error Messages, which says something like:

HTML Code:

<p><strong>$bbuserinfo[username]</strong>,<p> You do not have permission to access the forums, because you are temporarily banned.<p>Sorry, we hope to see you again in our forums soon.
<p><div align="$stylevar[right]"> <a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]">Log Out</a> <a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a> </div>

Try this out and let me know if it works, I have a reservation, since I am not sure if warn_opts have been evaluated at that point. If not, I'll give you a better solution tomorrow.

Delphiprogrammi 01-16-2005 09:34 PM

hi sv1cec ,

yeah i forgot about the logged in part it is /includes/functions.php you're right

however i tryed this on my "testvb" board and this block of code is giving me a parse error

PHP Code:

if($bbuserinfo['userid']) AND !$bbuserinfo['usergroupid']==$warn_opts['banned_usergroup_id'] OR !$bbuserinfo['usergroupid']==$warn_opts['troll_usergroup_id'])
    {
        eval(
print_standard_error('nopermission_loggedin',true));
    } 

anyway time to sleep now :tired:

sv1cec 01-17-2005 09:21 AM

The new version includes the checking for the special message that banned users receive when they try to log in.

Rgds to all

Delphiprogrammi 01-17-2005 10:32 AM

Quote:

Originally Posted by sv1cec
The new version includes the checking for the special message that banned users receive when they try to log in.

Rgds to all

hi sv1cec,

thanks for the new version but i'm facing a problem the modification that takes care of the "special message" for banned users well i banned my test account just to see what happens and the PHP parser gives me this error

Code:

Fatal error: Call to a member function on a non-object in /path/to/includes/functions.php on line 2066
line 2066 from /includes/adminfunctions.php is

PHP Code:

$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_options where oid='1'"); 

i can't see anything wrong it

rgds

sv1cec 01-17-2005 11:36 AM

Nothing's wrong with that phrase, what I ... forgot to tell you guys, was that you have to do another edit in the functions file. Scroll a bit higher up from where you made that mod, and find a phrase that looks like:

PHP Code:

    global $vboptions$logincode$url$bbuserinfo$session$stylevar

Replace that with:

PHP Code:

    global $DB_site$vboptions$logincode$url$bbuserinfo$session$stylevar

Don't expect me to be perfect at 08:30 am, not enough coffee in my system yet.

Delphiprogrammi 01-17-2005 11:43 AM

Quote:

Originally Posted by sv1cec
Nothing's wrong with that phrase, what I ... forgot to tell you guys, was that you have to do another edit in the functions file. Scroll a bit higher up from where you made that mod, and find a phrase that looks like:

PHP Code:

    global $vboptions$logincode$url$bbuserinfo$session$stylevar

Replace that with:

PHP Code:

    global $DB_site$vboptions$logincode$url$bbuserinfo$session$stylevar

Don't expect me to be perfect at 08:30 am, not enough coffee in my system yet.

nobody is perfect my friend errors /mistakes do happen we are all humans not *machines*

i searched the web about this error and found out it was something with a global statement already i just had no idea where i'll get back to you if that works and do not worry about to much ;)

Delphiprogrammi 01-17-2005 12:07 PM

sv1cec,

YES YES man can i buy a bucket of coffee :D :D working fine i modified the standerd "print_no_permission()" function

PHP Code:

function print_no_permission()
{
    global 
$DB_site,$vboptions,$logincode,$url,$bbuserinfo,$session,$stylevar;
    if(!
$logincode)
    {
        
$logincode=construct_login_code();
    }
    
$postvars=construct_post_vars_html();
    
$bbuserinfo['badlocation'] = 1// Used by exec_shut_down();
    
$warn_opts=$DB_site->query_first("SELECT * FROM " TABLE_PREFIX "warning_options WHERE oid='1'");
    if ((
$bbuserinfo['usergroupid']==$warn_opts['banned_usergroup_id'] OR $bbuserinfo['usergroupid']==$warn_opts['troll_usergroup_id']) AND $bbuserinfo['userid'])
    {
        
$ban $DB_site->query_first("SELECT liftdate FROM " TABLE_PREFIX "userban WHERE userid=$bbuserinfo[userid]");
        if (
$ban['liftdate']=='0')
        {
            
$until="permanently banned";
        }
        else
        {
            
$untilvbdate $vboptions['dateformat'], $ban[liftdate] );
            
$until=" temporarily banned, until the $until";
        }
        eval(
print_standard_error('nopermission_banned'true));
    }
    
// test
    
if($bbuserinfo['userid'])
    {
        eval(
print_standard_error('nopermission_loggedin',true));
    }
    else
    {
        
$scriptpath htmlspecialchars_uni(SCRIPTPATH);
        
define('VB_ERROR_PERMISSION'true);
        eval(
print_standard_error('nopermission_loggedout'false));
    }


thanks man for sorting that one out

sv1cec 01-20-2005 11:17 AM

Three days with no reported errors or problems??!!!

OK, so now it's time to start thinking of new things to add.

Rgds

jluerken 01-20-2005 11:35 AM

Quote:

Originally Posted by sv1cec
Three days with no reported errors or problems??!!!

OK, so now it's time to start thinking of new things to add.

Rgds

Oh please no. An update once every two month is enough I think.
I really don't like it to update a hack twice a week :D

Dennis B 01-20-2005 09:25 PM

Quote:

Originally Posted by jluerken
Oh please no. An update once every two month is enough I think.
I really don't like it to update a hack twice a week :D

These are days when we upgrade vBulletin every week, why not our hacks...? :D:D


All times are GMT. The time now is 06:32 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.02446 seconds
  • Memory Usage 1,936KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_html_printable
  • (17)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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