In the blog plugin while admin can edit the comments the other users cannot. I want to create a functionality where a user can proposed edits to the original commenter who will then accept or reject changes.
How should I proceed to implement this feature?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Steve Clay@steve_clay

Steve Clay - 0 likes
- bigdata2@bigdata2

bigdata2 - 0 likes
- bigdata2@bigdata2

bigdata2 - 1 like
- Steve Clay@steve_clay

Steve Clay - 0 likes
You must log in to post replies.This edit suggestion/approval process would be useful for any entity, so I wouldn't bind it too hard to comments.
For the backend, when a user makes a suggestion, you'd make an ElggObject with subtype suggestted_edit and access ACCESS_PUBLIC. "Public" allows it to be seen by the original author, but it won't automatically be exposed in listings/search. Then make a "suggestion_for" relationship to the original content, in this case a comment object, and send a notification to original author.
You'll need to make a page that shows the comment and the suggested edit, ideally with some kind of fancy diff view. You'd have approve/disapprove buttons, but also maybe a comment stream so the two users could discuss changes and the proposer could make changes to the suggestion.
If you develop this as a plugin on GitHub it'll be easier for us to help.
Thank you.
I will take a stab at the basic stuff first and leave fancy/advanced features for later. I will put it on github once I have something working.
@Steve Clay
Pushed the initial version of plugin to github. I am not happy with the diff view of the original and proposed content and it needs some more work. Send a PR or reply to this thread if you have any suggestions.
https://github.com/bigdata2/propose_edit
Code looks great but I haven't tried it yet.