Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how to remove the 'edited' flag from posts?
hello!
is it possible to remove the 'edited' flag from posts?
it should only be seen by the Administrator.
thank you
0
This discussion has been closed.
Comments
Legend
deleted
added
idealy, every post (for those who have permission to view post edits) should have that markup, but it isin't rendered (i.e. ins appears normal, del is hidden in CSS) by default to the user. Clicking on a diff button would then instantly with JS set styles for <ins> and <del> tags.
#Comments li div ul li em { display: none; }
oops - just read that you only want an admin to see the edited flag. give me a couple minutes, as the code above will remove it from view for all users, including the admin.
edit: i just thought about this, and even if i hacked together an extension to remove the display of the flag for non-admins, it would still be available in the source to everyone. being that my expertise lies with CSS and not php, i'm not really sure i'd be able to throw together something that would only display the tag at all (included the source) if an admin was viewing it. i'm sure it's probably possible, as extensions like IP History/Edit History add things to the comment area depending on what role is viewing it/has permissions, but i'm not sure how to go about doing something like that, let alone changing the way vanilla works by default instead of just adding on top. sorry if this is a dead end for ya, unless this is only a display quirk you'd like removed, that i can probably manage.
change this line
if ($Comment->DateEdited != '') $CommentList .= ' <em>'.$this->Context->GetDefinition('Edited').'</em>';
to
if ($Comment->DateEdited != '' && $Context->Session->User->RoleID == 4) $CommentList .= ' <em>'.$this->Context->GetDefinition('Edited').'</em>';
Note: 1. I didnt bother testing it, tell me if it doesnt work. 2. If your admin role isnt nr 4, exchange the number. it would be better off course to add it as a role permission, but as your probably just looking for a quick hack, there it is
Yea I know.
until I hit the post button.
I have nothing against the 'edited' notification, but I do wish it would not show up for posts
which were edited within a very small period of time since the original posting (or last edit)
and perhaps even ONLY if someone had replied to it already.
E.g. I post a topic/comment, if I hit edit within 3 mins, the post is not marked as such, I
can edit it, the 'timer' is reset just in case I discover another problem. Once someone
replies however, the 'edited' notification shows up regardless
Just a thought.