News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Change how often warning should decrease

Started by Liuwa, February 28, 2014, 06:22:51 AM

Previous topic - Next topic

Liuwa

Hello,

I'm looking which file is responsible for decreasing warning points (x/24hours). I would like to change, for example, every 1 week. Do you where to change that or how difficult it is do that?

Thank you,
Liuwa.

kat

I'm no coder. So, what I'm typing might be total rubbish.

To me, it looks like the amount of time is controlled by this section of code, which is in the file ScheduledTasks.php in your "sources" directory.

// More than 24 hours ago?
if ($row['last_warning'] <= time() - 86400)
$member_changes[] = array(
'id' => $row['id_recipient'],
'warning' => $members[$row['id_recipient']] >= $modSettings['warning_decrement'] ? $members[$row['id_recipient']] - $modSettings['warning_decrement'] : 0,
);
}
$smcFunc['db_free_result']($request);


86400 is the number of seconds in twenty-four hours? So, if you multiply that by seven (days), you get 604800.

Worth trying that, (after backing-up the file, in case I'm wrong)?

Advertisement: