
Re: How To Give Permisions To Moderators To Edit Post Time?
It is not a bug... changing post time it is something which could create problems in the DB... I don't want moderators to mess up with that.
Anyway if you want to allow moderators, you need to edit two files: viewtopic.php and edit_post_details.php.
FIND in viewtopic.php:
$post_edit_string = ($userdata['user_level'] == ADMIN) ? ('<a href="#" onclick="post_time_edit(\'' . $post_edit_link . '\'); return false;" style="text-decoration: none;" title="' . $lang['Edit_post_time_xs'] . '">' . $lang['Edit_post_time_xs'] . '</a>') : '';
REPLACE WITH:
$post_edit_string = (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD)) ? ('<a href="#" onclick="post_time_edit(\'' . $post_edit_link . '\'); return false;" style="text-decoration: none;" title="' . $lang['Edit_post_time_xs'] . '">' . $lang['Edit_post_time_xs'] . '</a>') : '';
FIND in edit_post_details.php:
if ($userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorized']);
}
REPLACE WITH:
if (($userdata['user_level'] != ADMIN) || ($userdata['user_level'] != MOD))
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorized']);
}