Thats in the ACP > General > Post SettingsDisplay last edited time information:
Choose if the last edited by information to be displayed on posts.
Code: Select all
<!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
<div class="notice">{postrow.EDITED_MESSAGE}
<!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
</div>
<!-- ENDIF -->
Code: Select all
// Editing information
if (($row['post_edit_count'] && $config['display_last_edited']) || $row['post_edit_reason'])
{
// Get usernames for all following posts if not already stored
if (!sizeof($post_edit_list) && ($row['post_edit_reason'] || ($row['post_edit_user'] && !isset($user_cache[$row['post_edit_user']]))))
{
// Remove all post_ids already parsed (we do not have to check them)
$post_storage_list = (!$store_reverse) ? array_slice($post_list, $i) : array_slice(array_reverse($post_list), $i);
$sql = 'SELECT DISTINCT u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_storage_list) . '
AND p.post_edit_count <> 0
AND p.post_edit_user <> 0
AND p.post_edit_user = u.user_id';
$result2 = $db->sql_query($sql);
while ($user_edit_row = $db->sql_fetchrow($result2))
{
$post_edit_list[$user_edit_row['user_id']] = $user_edit_row;
}
$db->sql_freeresult($result2);
unset($post_storage_list);
}
$l_edit_time_total = ($row['post_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
if ($row['post_edit_reason'])
{
// User having edited the post also being the post author?
if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id)
{
$display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
}
else
{
$display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']);
}
$l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']);
}
else
{
if ($row['post_edit_user'] && !isset($user_cache[$row['post_edit_user']]))
{
$user_cache[$row['post_edit_user']] = $post_edit_list[$row['post_edit_user']];
}
// User having edited the post also being the post author?
if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id)
{
$display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
}
else
{
$display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']);
}
$l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']);
}
}
else
{
$l_edited_by = '';
}
Code: Select all
<!-- IF postrow.EDITED_MESSAGE -->
<div class="notice">{postrow.EDITED_MESSAGE}
<!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
</div>
<!-- ENDIF -->