Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: Griffy - marraskuu 19, 2007, 04:54:14 AP

Otsikko: Request: Admin Stealth Edit of Post?
Kirjoitti: Griffy - marraskuu 19, 2007, 04:54:14 AP
Looking for a modification that will allow Admins (not Moderators) to edit ANY topic/post/reply with the option to not show the  "Last Edit: Some Day at 07:53:59 PM by SomeDude" at the end of the post.

For 1.1.4.

Anyone help out here?

Thanks for any assistance :D
Otsikko: Re: Request: Admin Stealth Edit of Post?
Kirjoitti: Griffy - marraskuu 25, 2007, 03:22:00 AP
*bump*
Otsikko: Re: Request: Admin Stealth Edit of Post?
Kirjoitti: H - marraskuu 25, 2007, 07:45:29 AP
http://custom.simplemachines.org/mods/index.php?mod=982 ?
Otsikko: Re: Request: Admin Stealth Edit of Post?
Kirjoitti: Griffy - marraskuu 27, 2007, 05:29:46 AP
Thanks H, much appreciated.

I figured somebody must have made it already, but I wasnt able to find it searching. With the criteria I used, I would have never found it titled as such.

Thank you!
Otsikko: Re: Request: Admin Stealth Edit of Post?
Kirjoitti: D M G - joulukuu 03, 2007, 10:22:39 AP
You could just edit post.php to say :


if (!$user_info['is_admin'])
// Have admins allowed people to hide their screwups?
if (time() - $row['posterTime'] > $modSettings['edit_wait_time'] || $ID_MEMBER != $row['ID_MEMBER'])
{
$msgOptions['modify_time'] = time();
$msgOptions['modify_name'] = addslashes($user_info['name']);
}


All you add there is the if (!$user_info['is_admin']) and it will hide any edits made to any posts after you change this line. If you want to update the ones you already edited, go into MySQL and execute :

UPDATE smf_messages
SET modifiedTime = 0, modifiedName = NULL
WHERE modifiedName = 'YOURUSERNAMEHERE';

Just change the smf_ prefix to make sure it matches your DB prefix..

Otsikko: Re: Request: Admin Stealth Edit of Post?
Kirjoitti: H - joulukuu 03, 2007, 04:13:44 IP
No problem, glad you got it working!