How to propose edits to the blog comments.

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?


  • 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.


  • Code looks great but I haven't tried it yet.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking