Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: SMiFFER on February 17, 2018, 04:26:18 PM

Title: Logging Functions
Post by: SMiFFER on February 17, 2018, 04:26:18 PM
I am missing a function where I can have more logging.

Example:
Some administrator on my board has entered a very bad CENSOR WORD combination
in Aadmin>Posts and Topics> Censored Words

How can I see who has entered that?
Title: Re: Logging Functions
Post by: Shambles on February 17, 2018, 05:03:42 PM
Ask them?
Title: Re: Logging Functions
Post by: Sesquipedalian on February 18, 2018, 01:39:46 AM
This is unlikely to become a normal feature, but you can implement it yourself easily enough.

In Sources/ManagePosts.php, find:

// Set the new arrays and settings in the database.
$updates = array(
'censor_vulgar' => implode("\n", $censored_vulgar),
'censor_proper' => implode("\n", $censored_proper),
'censorWholeWord' => empty($_POST['censorWholeWord']) ? '0' : '1',
'censorIgnoreCase' => empty($_POST['censorIgnoreCase']) ? '0' : '1',
);


After that, add:

logAction('update_censor', array(), 'admin');


Or, if you want the log to contain a verbose record of what the censor was set to:

logAction('update_censor', $updates, 'admin');


Note: I have not tested this. See signature for my guarantee policy.