1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Post Edit History and Logging

Discussion in 'Have You Seen...?' started by Mike, Mar 22, 2013.

  1. Mike

    Mike XenForo Developer Staff Member

    Post edit history and logging has been one of the most requested features and it will be a core feature in XenForo 1.2.

    Post Edit Logging
    Post edit logging is the simpler of the two features. It adds an indication to the post when it has been edited. We have intentionally kept this feature simple for the average user. They have no reason that they have to enter; if they're inclined, they can always include the reason in the message.

    We do track the last person to edit the message, but this is not displayed. It could be easily added with an add-on. In most cases, the last edit will be by the owner and the average user likely doesn't care about who edited it. If a moderator needs to know, the history gives much more detailed information.

    The edit log can be set to not be displayed if a post is edited in the first X minutes.

    So what does this look like on a post?

    ss-2013-03-22_11-36-01.png

    Moderators also get a few extra options to control the public log of the edit. Note that these options do not affect the history. This only allows them to suppress the public notice.

    ss-2013-03-22_11-36-36.png

    Post Edit History
    Post edit history actually keeps all previous versions of a message rather than just an indication that it was edited. This can be used for many things, including handling the "rage-delete" situation, where a user edits all of their content, potentially destroying the flow of many threads.

    For developers, it's worth noting that the history system has mostly been developed to be content agnostic. Add-ons can make use of the system and automatically get access to the history and comparison interface.

    Whenever a post is edited--even with a "silent" moderator edit--the history is logged. You may have noticed it in the screenshot above, but a history link will appear whenever a post has been edited.

    When you click that link, you will have an opportunity to pick two versions to compare and see the actual changes made

    Note that the UI I'm demonstrating below is still a work in progress and improvements will be made.

    ss-2013-03-22_11-43-27.png

    You can also view the previous version in its raw form with a button to the right (which I didn't include in the screenshot). Options to automatically revert to a previous version may be included.

    History data can be set to only be maintained for a specific number of days.
     
  2. Slavik

    Slavik XenForo Moderator Staff Member

    Many people will be pleased by this HYS :)
     
    Sylar, JMPRockFm, EgyKit and 2 others like this.
  3. Biker

    Biker Well-Known Member

    Nice. Will there be an option to revert the post from the existing history?
     
    Alfa1 likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Great work, Mike :)
     
    ForestForTrees likes this.
  5. Slavik

    Slavik XenForo Moderator Staff Member

    Did you read the post :D?
     
  6. SneakyDave

    SneakyDave Well-Known Member

    Great stuff. Can it be used on profile posts and report posts also?
     
  7. borbole

    borbole Well-Known Member

    Indeed they will. Coincidentally only a few days ago a client of mine who is converting to xenforo asked me about this feature btw.
     
  8. Hoffi

    Hoffi Well-Known Member

    Did you use an existing Diff-Viewer, or do you develop your own?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    I can only guess, but a Diff viewer is already included in XenForo (in the library/Diff directory).

    This one, in fact: https://github.com/chrisboulton/php-diff

    I would assume they're using the same thing.
     
    btfstone likes this.
  10. Mike

    Mike XenForo Developer Staff Member

    We don't include that. It's our own system.
     
    Hoffi, Nasr, Veer and 2 others like this.
  11. Lisa

    Lisa Well-Known Member

    Mike, I officially love you now :D
     
    14DH01 and Brandon Sheley like this.
  12. Biker

    Biker Well-Known Member

    Several times. But nowhere did I see that a post could be reverted back to its original state. Only that you could SEE what the changes are.
     
  13. Slavik

    Slavik XenForo Moderator Staff Member

    At the bottom :)

     
  14. Biker

    Biker Well-Known Member

    So it may or may not be included. OK.
     
  15. Green Cat

    Green Cat Active Member

    Great, that's the feature I wanted most in 1.2 :)
     
  16. Crayo

    Crayo Active Member

    Another sweet addition. Thanks.
     
  17. CyclingTribe

    CyclingTribe Well-Known Member

    This would be very useful - presumably it would give a mod/admin a one-click restore to a previous version?
     
  18. shawn

    shawn Well-Known Member

    That's awesome. Very nice. Thank you. That's another add-on we won't need anymore. Don't get me wrong -- I'm absolutely grateful to the programmer that wrote it -- but I'd much rather prefer to see great features like this in the core.
     
  19. TheBigK

    TheBigK Well-Known Member

    That's cool!

    Mike - do something about admincp user search feature. We *seriously* need more criteria to search users and an ability to send them activation mail :D
     
    Veer likes this.
  20. Digital Doctor

    Digital Doctor Well-Known Member

    Edit history - amazing !!!!

    How about editing thread titles ?
    Pretty please :)

    Fingers-crossed1[1].jpg
     
    Gish, ZeWildGuy, faeronsayn and 5 others like this.

Share This Page