Hi, I find this mod in TBDEV.
I tried to change the torrenttrader, but failed to do
Code:
Anyways, here we go
and after
And that's all
NOTE: In short time I will add the script which auto disables the user, it's basically just a condition which checks if the user has more than 3 warnings -> set enabled = 'no';

[url="http://www.tbdev.net/index.php?app=core&module=attach§ion=attach&attach_id=6699"]Images[/url]
Mod Note: Please give credit to original author.
I tried to change the torrenttrader, but failed to do
Code:
Anyways, here we go
ALTER TABLE `users` ADD `timeswarned` int(10) NOT NULL default '0';Now go to userdetails.php and after
print("<tr><td class=rowhead>Class</td><td align=left>" . get_user_class_name($user["class"]) . "</td></tr>\n");
add this
//===Warned Progress Bar by TripleH @ TBDEV.NET
$UserTimesWarned = $user["timeswarned"];
switch($UserTimesWarned)
{
case 0:
$warnedbar = "<img src=pic/warn_0.png>";
break;
case 1:
$warnedbar = "<img src=pic/warn_1.png> - <b>30%</b>";
break;
case 2:
$warnedbar = "<img src=pic/warn_2.png> - <b>60%</b>";
break;
case 3:
$warnedbar = "<img src=pic/warn_3.png - <b>90% - <font class=small>Be careful! One more warning and your account will be disabled</font></b>";
break;
case ($UserTimesWarned > 4):
$warnedbar = "<img src=pic/warn_max.png> - <b>100% - Disabled</b>";
break;
}
print("<tr><td class=rowhead>Warned level</td><td align=left>$warnedbar <font class=small>(".$UserTimesWarned." warning" . ($UserTimesWarned > 1 ? "s" : "") . ")</font></td></tr>\n");
//===Warned Progress Bar by TripleH @ TBDEV.NET
And now not understand
Now go over to modtask.php, and search for
$updateset[] = "warned = 'yes'
and replace it with
$updateset[] = "warned = 'yes', timeswarned = timeswarned+1";
where modtask on torrenttrader
Now, in order to auto disable the account when a user gets the 4th warning, add this part into cleanup.php
//=== Warned Level Mod - TripleH @ TBDev.Net (Thanks arcticwolf44 for this piece of code)
$res = mysql_query("SELECT id, modcomment FROM users WHERE timeswarned = 4 AND enabled = 'yes'") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
$dt = sqlesc(get_date_time());
while ($arr = mysql_fetch_assoc($res))
{
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = gmdate("Y-m-d") . " - Auto Disabled for having over 3 Warning by -AutoSystem.\n". $modcomment;
$modcom = sqlesc($modcomment);
mysql_query("UPDATE users SET enabled='no', modcomment = $modcom WHERE id = $arr[id]") or sqlerr(__FILE__, __LINE__);
}
}
//===And that's all
NOTE: In short time I will add the script which auto disables the user, it's basically just a condition which checks if the user has more than 3 warnings -> set enabled = 'no';

[url="http://www.tbdev.net/index.php?app=core&module=attach§ion=attach&attach_id=6699"]Images[/url]
Mod Note: Please give credit to original author.