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?

edited April 2007 in Vanilla 1.0 Help
hello! is it possible to remove the 'edited' flag from posts? it should only be seen by the Administrator. thank you

Comments

  • edited April 2007
    yes... btw, Mark, what is the point of this tag? if it is to expose those who posted some crap, and then deleted it, then it is unethical towards good members, who simply correnct a misprint... so, i don't get it actually... however, it would be much more useful to see which parts the user has removed from the original post, and which parts had been added... what do you think? (i don't promote creating an addon or something,,, just sharing)

    Legend
    deleted

    added
  • edited April 2007
    Completely agree, crash. Except, note that HTML already has tags you can use to indicate additions

    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.
  • i say lt people edit away. the edited tag is fine, tells me its worth reading the post again. if its important that I know the difference, the poster will tell me about it. If your worry is people posting vulgarities and then deleting them, IMHO the solution lies elsewehere (ban the abusers, ignore them, dont frequent forums where there are people who misbehave, call them troll and shake your head at them. I just dont see the harm. If they deleted something offensive, that probably meant they understood they was in the wrong and corrected their mistake. Or at least consider it gone, so no more will be offended. Say IMDB, I always get annoyed at the "This post was deleted by an administrator". It ruins the flow of the thread. If the guy was a jerk, so be it. Let him flaunt his jerkness to the world. There will always be trolls and haters on any forum of size. Best thing is to give them no attention. YMMV..
  • which line of code i should drop to remove it?
  • edited April 2007
    @juliank - adding this to the stylesheet of the style you're currently using will remove it from view. it'll still be in the source, and you don't have to worry about mucking around the internals too much.

    #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.
  • Take a look at http://lussumo.com/community/discussion/6196/show-username-date-and-time-of-edits/#Item_5

    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
  • MarkMark Vanilla Staff
    @Mr Do, you'd be better off to check a permission rather than look at a roleid.
  • Qoute Mr Do: [..] it would be better off course to add it as a role permission, but [..]

    Yea I know. :p
  • As a frequent 'misspeller' I end up using the edit feature a lot when I don't catch mistakes
    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
  • When you update a whiteboard through 37signals' Basecamp, you have the option of saving it as a new revision (for major changes), or saving it directly over the current one (for minor changes). Maybe add that kind of option. If its a major change, then check a box and that box will summon the edit flag to go up. If its not, like to fix a spelling mistake or add a period, then it'll write over the previous version with no flag.

    Just a thought.
  • but why? whats the importance?
  • @Mr Do - i agree.
  • @ Mr Do: I can't find this line of code in comments.php
  • @juluank: its line 102 in my comments.php
  • And it should be themes/comments.php, line 96 in Vanilla 1.1.2. Copy it into the themes/Vanilla folder before you change it, that way your changes won't be lost when you next update Vanilla.
  • right, I think i was refering to it in the themes folder in the other thread, mine is probably a bit longer, cause it was allready in the themes folder due to some other change.
This discussion has been closed.