I went closer to this implementation and discovered, that something conflicts here.
I'll try to explain how our script works.
So, in database, we have post_status field which means the following:
*) 0 - message is untouched by anyone.
*) 1 - message is edited BY AUTHOR. So, if it is allowed, author can edit this message again as he may edit any message marked with status 0 or 1. If status is 1, when displaying a message, scripts reports that it was edited by author and puts near editing bar his name automatically. NOTICE: this name is not saved in any field! It is generated on the fly. That's why we have no EXACT moderator's name here.
*) 2 - message is edited BY ADMIN. By rules, it is disallowed to edit this message by user.
*) 3 - message is edited BY MODERATOR. By rules, it is disallowed to edit this message by user.
So, according to previous requests, I've made so when Admin or Mod do not touch "EDIT" box, the status of the message is not changed at all. So, if it was 0, it will be 0, if it was 1 - it will be 1. And users are able to edit their messages this time. When checkbox is marked, status is changed to 2 or 3, and users are not able to edit such kind of messages by rule.
Now, I am gonna add the following:
- If Admin or Mod edits NOT his message, and marks EDIT box, status will be 2 or 3. But if he edits his own message, status will be always 1. With this, script will display Admin's or Moderator's name.
- If Admin or Mod edits NOT his message, but doesn't mark EDIT box, status will be 1, if this is his own message, or 0 - if it is other's message.
So, with this, we are keeping previous request, when Admin is able to edit someone's message hiding it to public; at the same time, when editing his own posts, Admin can not hide that fact.
Isn't it good? :-)
I think, this is the only possible logic in this case. Let me know guys what do you think.