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.
Post Edit History
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 :)
0
This discussion has been closed.
Comments
- 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.
Cool extension!
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.
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
History page, all purdy
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
Also some people may like to view them chronologically going down instead of up as with comments in discussions...thats a personal thing though.
@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.
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.
@Wall: Excellent idea