View Full Version : i found a bug
Delphiprogrammi
02-19-2005, 04:23 PM
hi,
in the admincp if you try to add a warning type aws doesn't check if the forum is properly filled in and the warning type just get added with blank fields (and 0 for numerical values) this is a small problem and doesn't reaaly affect the operation of the hack but John if you got 10 times off time please fix that
sv1cec
02-20-2005, 11:20 AM
hi,
in the admincp if you try to add a warning type aws doesn't check if the forum is properly filled in and the warning type just get added with blank fields (and 0 for numerical values) this is a small problem and doesn't reaaly affect the operation of the hack but John if you got 10 times off time please fix that
Delphi,
This is in AdminCP. If an admin enters nothing, or enters stupid values, it is his fault. I agree with you that checks are better than no checks, but if I start checking everything, then programming those checks will eat up all my time. Maybe if I get some free time, I'll add those checks.
Rgds
Delphiprogrammi
02-21-2005, 10:59 AM
hi John,
i added a few checks myself if the warningtypename description or points is empty an error message is displayed that was quite simple one small code edit and three new phrases the rest of the form cannot be left as it is cause those are personal choices and always have a value ...
sv1cec
02-21-2005, 11:48 AM
hi John,
i added a few checks myself if the warningtypename description or points is empty an error message is displayed that was quite simple one small code edit and three new phrases the rest of the form cannot be left as it is cause those are personal choices and always have a value ...
Delphi,
If you keep up like that, at the end you will be able to write your own AWS! That's how I started with ZT's hack and see where I end up with.
LoL, Good work my friend.
I'll have a new version out today or tomorrow, with a couple of new additions, like the ability to define a cut-off point, after which the user's signature or avatar will not show, if he has exceeded that limit of warning points.
Stay tuned.
Delphiprogrammi
02-23-2005, 01:42 PM
hi,
if anybody wants it .Here's howto do that.In the file /admincp/admin_warn.php
find this code
if ($warn_opts['allowoffpost']=='No' AND $_POST['warn_type']=='No')
{
define('CP_REDIRECT', 'admin_warn.php?act=view');
print_stop_message('warning_warn_typeconflict');
}
below that add
if(empty($_POST['warn_name']) OR $_POST['warn_name'] == '')
{
print_stop_message('warning_warn_emptywarntype');
}
if(empty($_POST['warn_desc']) OR $_POST['warn_desc'] == '')
{
print_stop_message('warning_warn_emptydesc');
}
if(empty($_POST['warn_points']) OR $_POST['warn_points'] == '')
{
print_stop_message('warning_warn_emptypoints');
}
if(empty($_POST['warn_maturity']) OR $_POST['warn_maturity'])
{
print_stop_message('warning_warn_maturity');
}
create 4 new phrases named as in the print_stop_message() call
in your admincp you cando this with the phrasemanager
like this
1)type = controlpanel stop message
varname=warning_warn_emptywarntype
text=Please provide a proper name for the warning type
2)type control panel stop message
varname=warning_warn_emptydesc
text = please provide a proper description for the warningtype
3)type = control panel stop message
varname=warning_warn_emptypoints
text=please provide proper points for the warning type
4) type=control panel stop message
varname=warning_warn_maturity
text=please provide a proper maturity for the warning type
that's it easy...
sv1cec
02-23-2005, 06:32 PM
hi,
if anybody wants it .Here's howto do that.In the file /admincp/admin_warn.php
find this code
if ($warn_opts['allowoffpost']=='No' AND $_POST['warn_type']=='No')
{
define('CP_REDIRECT', 'admin_warn.php?act=view');
print_stop_message('warning_warn_typeconflict');
}
below that add
if(empty($_POST['warn_name']) OR $_POST['warn_name'] == '')
{
print_stop_message('warning_warn_emptywarntype');
}
if(empty($_POST['warn_desc']) OR $_POST['warn_desc'] == '')
{
print_stop_message('warning_warn_emptydesc');
}
if(empty($_POST['warn_points']) OR $_POST['warn_points'] == '')
{
print_stop_message('warning_warn_emptypoints');
}
if(empty($_POST['warn_maturity']) OR $_POST['warn_maturity'])
{
print_stop_message('warning_warn_maturity');
}
create 4 new phrases named as in the print_stop_message() call
that's it easy ...
If you are doing the good thing, do it complete, list the phrases as well.
Rgds
Delphiprogrammi
02-23-2005, 06:45 PM
If you are doing the good thing, do it complete, list the phrases as well.
Rgds
post updated with the phrases :up:
sv1cec
02-24-2005, 08:18 AM
Good work Delphi, I added those phrases to the installation instructions.
Rgds
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.