Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
comment.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2006 at 11:53 UTC
Updated:
29 Jul 2014 at 17:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
profix898 commentedMaybe this is not a bad idea! But I think you should also prevent users
from altering their comments when any subsequent comment has
already been posted. And for typos 1 hour limit seems a bit too long,
better 15-30 min.
Comment #2
dan_aka_jack commentedYes, good idea: prevent users editing their posts once that post has been replied to.
And I agree - 1 hour is a bit long. I agree that 15 minutes would probably be better.
Thanks for your reply!
Comment #3
dan_aka_jack commentedHere's a patch...
The patch does several things: firstly, it makes two new permissions: "edit own comments" and "edit all comments". Then it adds a setting in admin/comments/configure called "Comment edit duration".
Here's how I've setup the patch on my site (ukfilm.org):
1) apply the patch
2) go to admin/access permissons and give "authenticated users" the "edit own comments" permission. I've got a group called "moderators" who I've given "edit all comments" permission.
3) By default, users can edit their comments for ever. If you want to set a time-limit then go to admin/comments/configure and set a timelimit in the "Comment edit duration" box. Easy!
Thanks,
Jack
Comment #4
dmitrig01 commentedthis got in already
Comment #5
cog.rusty commentedI don't think so. I don't see anything about "own comments" in admin/user/access or anywhere else.
Editing and deleting own comments are much requested features where Drupal falls short of the "competition".
Comment #6
cog.rusty commentedComment #7
cog.rusty commentedOops. The code was old.
Comment #8
Rob T commentedI did this in my 5.5 install. It seems to be working fine.
Comment #9
1kenthomas commentedThis thread is a little old a but I propose an additional addition: comments revisions. Since the status of the above is unclear (http://drupal.org/node/228112) assigning to myself for the time being.
Comment #10
cog.rusty commentedRegarding comment revisions, you may want to check this module if you haven't already.
http://drupal.org/project/comment_revisions
Comment #11
1kenthomas commentedThanks (I had searched for every module starting with "comments*".) Though my point was more "everything is a node," I'll take a look at the code.
Comment #12
maulwuff commentedHere is a patch for 5.7
It is based on the one from #3
I added
#mod start and
#mod end for each mod, to make future updates easier. :)
it also contains the original parts commented out.
Comment #13
maulwuff commenteddoubleklicked :-/
Comment #14
maulwuff commentedThe patch from #3 and #12 locked out the admin from editing comments after the countdown has finished. Improved version on #12
Comment #15
aharown07 commentedOK, pretty new to Drupal and definitely not strong in PHP.... so this code should work in 5.x? And can I paste it whole in comment.module or just the parts between "+mod start" and "+mod end"?
I'll be sure to back up before I try this, too.
Comment #16
aharown07 commentedOK, figured out that if you mannually apply a patch, you remove lines beginning with - and add lines beginning w/+.
Did that, but what happens is:
1. All comment module permissions disappear from Access Control (the Comment module doesn't show at all)
2. Users can't edit their comments at all
So something's clearly not quite right in my code. Maybe this is because I'm using 5.11? Or maybe I missed something else? Can anyone help me find the trouble? I'm attaching the hacked version of my comment.module.
Also, if somebody wants to made a working module out of this for 5.x, I'd sure be interested in that... maybe even willing to pay for it interested (hope this isn't the wrong place to say that).
Comment #17
maulwuff commentedthis patch was for 5.7
I have not tried to apply it to the 5.12er version.
applying patches manually is very hard. if your module disappears completely, you might have messed something up. see here also: http://drupal.org/node/60108
Comment #18
aharown07 commentedWell the patch wasn't all that large... it looks way easier to put it in manually than to download and install all the stuff needed to apply it.
Anybody know if there were changes to comment.module between 5.7 and 5.11 (I'm actually still on 5.11)? Doesn't seem likely there would be much. Maybe I should just do it again from scratch and see if can find anything I missed.
Comment #19
cog.rusty commentedNo, no changes to comment.module between 5.7 and 5.11 (see http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/comment/comment.mo...)
Comment #20
aharown07 commentedEureka!!
I hope it's OK to post the entire comment.module code here. Will do as attachment.
What happened was that in manually putting in the patch, I had accidentally removed
function comment_perm{stuff here}Had the "stuff here" w/o the actual function.Anyway, as fixed, it's working so far in 5.11. For folks who "can't patch" (like me) here's the whole thing. Just remove "txt" from the end.
"#mod" marks the altered areas.
Of course, when it comes time to upgrade, will have to rewrite in new comment.module... unless maybe somebody can tell me how to do this with overrides in template.php and/or comment.tpl.php?
Comment #21
csbhat commentedI've created a patch for drupal 6. This is my first very small contribution to Drupal community!
Comment #22
damien tournoud commentedFeature requests need to be filled against the latest development version (Drupal 7) at this time.
Comment #23
csbhat commentedPlease disregard the file attached earlier. Use the file attached with this comment.
Comment #24
csbhat commentedPlease disregard the file attached earlier. Use the file attached with this comment.
Comment #25
stevenpatzComment #26
igorik commentedPlease send a patch primary, not whole module.
If drupal developers will do any changes in comment.module in version 6.13, this module file will be useless.
Patch is always better.
Thanks for your work, will be great to have working patch (or list of changes at least) from you.
Igorik
Comment #27
aharown07 commentedFYI, the Comment Edit module now includes time-limited editing.
Comment #28
igorik commentedHi, Is somewhere special "Comment edit" module or you think these patches on this page?
I looked for that module but I found nothing with name "Comment edit"
Can you suggest url for it?
Thanks
Igor
Comment #29
aharown07 commentedIt's actually Coment Edited I guess. Seems to work well for us. We have a forum with about 700 active users.
Here's a link...
http://drupal.org/project/comment_edited
Comment #30
sopia commentedThis worked for me in Drupal 5. Thanks maulwuff!
Comment #31
tr commentedFeature requests need to go into Drupal 8.x first, then they can be backported if appropriate.
Comment #32
dixon_This is an excellent usecase for a contrib module to implement. It adds complexity to code and UI that far from everyone needs. There are a wide range of modules that solved most of what's been discussed here. Comment edited is one of them.