Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  # 1
    I'd like to see an Add-on that can save and recall the edit history of a comment. The ability to recall history would be tied to a preference in the role of the user (like "Can't Sign In" or "Show All Whispers" etc). All users would have comment histories saved.

    I can't start working on it myself yet, as I'm going to be flailing with converting punbb -> vanilla (damn you MD5/SHA1!) -- but if no one else jumps on it, I certainly will :)
  2.  # 2
    Status:
    - Got the roles permission working (with a few stumbles).
    - Got a link inserted into the comment of each discussion (like, "quote" or "edit") when a user has permission to view the history.)
    - Got the "PostBackAction" page hooked so that I can display the relevant history status

    Next steps:
    - auto database table creation
    - hooking the edit process to store the old revision before it is overwritten
    - only displaying the "history" link when there *is* history (or, perhaps, change it's style accordingly)

    I've found examples on how to do the database auto-creation (yay code swiping from other extensions for learning!) but I'm a little lost on how to hook into the editing process. If you have any pointers here, I'd really dig hearing them. Thanks.
  3.  # 3
    To hook into the editing process I suspect you need to find the function[s] which edits a post and see if there are the necessary delegates in place for you to hook into. If not I suggest you put a kind request in Marks direction once you've worked out what you need where :)
  4.  # 4
    Rgr that -- I figured I was in for some digging :D debug_backtrace be praised...
    •  
      CommentAuthorPol
    • CommentTimeDec 7th 2006
     # 5
    Take a look at the PreSaveComment hook in library/Vanilla/Vanilla.Control.DiscussionForm.php. I think that'll provide what you need.

    Cool extension!
  5.  # 6
    Progress!

    Wow, I feel like a blind man walking through a crystal vase shop coding through this. So new, so different -- gone are the days of direct & dirty sql punbb queries ;D

    Anyway, I got finished with:
    - database auto-initializing
    - hooking, snaging and storing the comment edits
    - displaying that a comment has edits, and thus a history
    - display the edits (nicely!) on the follow up edit page
    - nice ways of erroring out for now history/lacking permissions

    TODO:
    - I missed the hook for when and edit happens to a 'starter' comment (I think I saw this as PreSaveDiscussion right above the other hook, but I'm tired now...)
    - The edit page needs to link to the profile for the person who did the editing (at the least, their name and not id)
    - - This will be acomplished when I have slept and can get the sqlbuilder to do my join like bidding, no biggie
    - Not much else. :D

    I should have this done tomorrow (friday for me) -- any one care to be my guinea pig for some testing?

    Oh, and to entice you, here's some eye candy:

    History links, striken and all
    edit history buttons showing

    History page, all purdy
    edit history page in all it's simple glory
  6.  # 7
    this feature was provided by jotspot. their forum has revision history. neat idea.
    but what the practicality of this. we hardly ever edit over comments, and even if we do, it usually spelling mistakes etc
  7.  # 8
    It's not for users, it's for moderators. (In fact, the user doesn't even get to see the history -- just groups assigned the privilege)

    Along the same lines as never truly deleting comments, I also hate losing the history of what was said by a user. This comes in very, VERY handy when moderators/admins have to deal with lame users linking to inappropriate places, spouting off, or generally incriminating themselves -- we can instantly edit out what the moron left, but still retain a record of what was done for reference.

    Additionally, there's very little way to otherwise tell if a person edited for spelling vs. edited to remove something damning.

    But hey, it's a completely transparent extension -- don't want it? Don't use it. If you need it, you'll be glad it's around ;D
  8.  # 9
    Just one thing, which appears not to currently happen (unless your 2 screenshots are from different things) - could you put the existing comment up top there? So people know what it says now?
    Also some people may like to view them chronologically going down instead of up as with comments in discussions...thats a personal thing though.
  9.  # 10
    have u made punbb extensions.
    If yes then how do u compare Vanilla API with that of Punbb
    •  
      CommentAuthorgarvin
    • CommentTimeDec 8th 2006
     # 11
    Will this extension allow a user to revert back to a saved edit?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeDec 8th 2006
     # 12
    Nice idea as an option garvin :)
  10.  # 13
    @MySchizoBuddy: punbb API? It has no api, silly ;) You just hack into the core files with patches. The typical pain.

    @Minisweeper: Yeah, I can put the current comment at the chronologically correct spot. I'll look into how to have an option to switch between asc/desc ordering. Perhaps as a per-user option.

    @garvin: no, the intention isn't really for versioning, so much as it is for historical records. I suppose you could allow members to view the history edits, thus allowing them to see what's changed and copy/paste back to an older version.
  11.  # 14
    FUCK. SBC, YOU PRICKS.


    Sorry, random f'ing internet failure. I had this whole nice long post written up, so now you just get images:

    ------------------------------------------------------------

    ------------------------------------------------------------

    ------------------------------------------------------------

    ------------------------------------------------------------

    ------------------------------------------------------------

    And a download link: EditHistory v0.1.0

    Standard feedback is appreciated, but I'm also interested in knowing how well the code is executed. Tips on flow, shortcuts, methodology, etc would be well received in this area as well.
    •  
      CommentAuthorgarvin
    • CommentTimeDec 9th 2006
     # 15
    I know your original intention was not to attach "versioning" to it, but could that be done with the same extension?
  12.  # 16
    In what way? Technically, this is versioning. Rudimentary, but true enough.
  13.  # 17
    Note to self: escape DB input for edits. (Funny, I would have thought that the SqlBuilder class would have handled making sure input was escaped...)
  14.  # 18
    edits? Dont the text formatters handle that?
    •  
      CommentAuthorWallPhone
    • CommentTimeDec 9th 2006
     # 19
    Another note: Showing the IP of the computer that did the editing may be useful.
  15.  # 20
    @Mini: I mean I need to escape the insert for saving the previous history or it can cause an error.

    @Wall: Excellent idea
  16.  # 21
    Another note: and the username, since it doesnt have to be the original poster. And only show the IP if it's allowed.
  17.  # 22
    It does show the editing user. I just happen to be the only one testing it :D
  18.  # 23
    Ok. So it does. I just found some wierd things on my face either side of my nose and slightly further up....any idea what theyre for? :D
  19.  # 24
    Poking? :)
    •  
      CommentAuthorgarvin
    • CommentTimeDec 9th 2006
     # 25
    Versioning as in... being able to revert, like I was asking before. : ) Just trying to get you to do it. Heh.
  20.  # 26
    Copy -> Paste
    Or are you looking for the super lazy "revert to this version link"?

    p.s. you avatar creeps the fuck outta me.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeDec 10th 2006 edited
     # 27
    Looks like G-Man :D

    •  
      CommentAuthorWanderer
    • CommentTimeDec 10th 2006
     # 28
    Looks like Pee-Wee Herman!

    •  
      CommentAuthorgarvin
    • CommentTimeDec 28th 2006
     # 29
    'Tis
Add your comments
    Username Password
  • Format comments as