Advertisement:

Request: Admin Stealth Edit of Post?

Aloittaja Griffy, marraskuu 19, 2007, 04:54:14 AP

« edellinen - seuraava »

Griffy

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


H

-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Griffy

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!

D M G

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..


H

-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Advertisement: