Closed (fixed)
Project:
Comment edited
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Dec 2008 at 19:17 UTC
Updated:
28 Jan 2009 at 17:20 UTC
From http://drupal.org/node/331525#comment-1121473
I'd also like to add that viewing the "last edited" message as well as creating the "last edited" message should be permission-based. That is, I should be able to make it so anonymous users can't see when a message was edited (or at least, who edited it) and only User 1 can see when administrators edit a message.
Michelle
Comments
Comment #1
snufkin commentedShould not be very difficult to implement this, i could add settings options to the admin page where the user can set up which roles could see the edited message.
Comment #2
michelleI would just use the Drupal permissions system for it. Something like:
For the purposes of this, "admin" could be any person who is editing a comment and not the original author. Then your code would just look at the UIDs. If they don't match, the viewer needs the second permission to see it. Otherwise they only need the first.
Michelle
Comment #3
snufkin commentedAh i see what you mean. I thought of a dropdown select into the admin pages to chose a role, but this would make more sense, and then i dont need to bother about user 1 either. Cool, thanks!
Comment #4
michelleNo problem. :) Thanks for doing the module. Just one more step to complete Drupal forum domination. Erm... or something. ;)
Michelle
Comment #5
snufkin commentedA bit lengthier review of this request
The feature needs two types of edits. One that is made by moderators, and one that is from a user. The use case is that if user makes a change everyone with a permission to view edit generic messages will see it, and if a moderator makes an edit then a user with another permission can view it.
So basically we want to have three permissions.
1) allow users to view generic edit messages
2) allow users to make hidden moderation edits, meaning users need a permission to see this
3) allow users to view hidden edit messages
There is one problem this feature arises: user makes an edit, and then a moderator makes an edit. Now there are two messages to display, common users see the user edit message, admins see the moderator edit message.
I wish we had revisions available for comments.. im not really eager to store a history of changes, because im afraid that the tables could grow very large on a busy site. I will probably implement this using an edit type field in the database table for the histories that would have two options: user edit or admin edit.
What happens if an admin edits his own post? its not moderation, so should it be shown?
Comment #6
snufkin commentedI committed a small change that makes edits by user 1 silent (his/her edits dont display), and an access permission to view the messages.
This is not the full issue of course, because one would want others than user 1 (moderators) to be able to do silent edits, but i'll wait for more feedback on this.
Comment #7
icecreamyou commentedAlways use the most recent edit, because it reflects the status of the comment as everyone can currently see it. So if a moderator was the last to edit the comment, some users might not see that it was changed. However, it might be prudent to give admin an option on the settings page to only show the time that the comment was changed, and not the name of the user who changed it.
It may also be a possibility to allow the moderator to choose which message shows up when editing a comment, particularly if users are allowed to give a reason why the comment was changed.
It should be shown as a non-moderated edit.
Comment #8
snufkin commentedFixed in http://drupal.org/cvs?commit=164850 for dev. I added two more permissions, one for doing such hidden edits, and one to view them. The general scenario probably is that you add these two permissions for your moderators only.
There are two display options as well, one limits the display to the last user edit only, even for moderators (default), or display both messages (theme function, customizable).
Users will no permission to view the moderation messages will see no difference at all.