Most forum systems let you set a limit for how long you can edit a post. This gives you time to fix minor mistakes but not change your words once people have started replying. This one is getting out of scope, so I understand if you won't fix. At the same time, making a seperate module for it may be overkill and this does already deal with editing posts. I'll leave the decision up to you.
Thanks,
Michelle
Comments
Comment #1
snufkin commentedhmm comment edit is coming from the comment module itself, i'll probably need to override those functions (callbacks and the actual printed links). I don't know if it fits into the profile of this module, indeed a new module seems a bit overkill, so why not. I'll take a look after the permission based display.
Comment #2
michelleYeah, it's one of those things that is really pushing the scope but similar enough that it's not a total stretch. And it would be nice for forum users to only have to install one module to handle "beyond core" editing issues. Goodness knows there's enough modules to install to make a Drupal forum already. LOL
Thanks for considering it,
Michelle
Comment #3
The Crash commentedSo can you add this feature to the module Michelle?
as you say making a seperate module for it may be overkill .
Comment #4
expatme commentedwhats up with drupal not allowing people to edit errors and typos?? its not like an auction where you cant take back a bid LOL
whats the rational in drupal that i have NOT seen in forums and other CMS'es?
Comment #5
michelle@The Crash - It's up to the module's maintainer. If you read the issue, you can see we're discussing it.
@expatme - What are you talking about? Drupal doesn't prevent you from edting errors and typos. The whole point of this issue is to allow admins to set a time limit for these edits so people aren't allowed to change their words after many people have commented based on what they originally said.
Michelle
Comment #6
The Crash commentedIn fact Michelle, I read the issue but I didn't know what do you want?
feature request: That mean you want the module like me , I am not a developer so I can't support you to do any module...I just can wait with you .
Comment #7
michelle@The Crash - I'm not sure how to make it any clearer. It's a feature request that I'm asking snufkin to consider adding to this module. I can't do it; I'm not the maintainer and that would be a misuse of my access to just go and add it to the module without his consent.
Michelle
Comment #8
snufkin commentedThe Crash: as Michelle said. I am the module maintainer, and I am considering adding this feature. Of course any form of support, patch is welcome.
On a sidenote: seeing the feature requests I think it would be a good idea to turn this module into some kind of comment enhancement. Sadly core comment module is not very customizable, moreover its explicitly integrated into the node module too...
Comment #9
arthurf commentedI wrote the following quickly for D5 while trying to sketch out some other code. I haven't tested it much, but it should work if you through it in a hook_form_alter and update the $form to D6. Also requires an admin setting. I'll write it up for you in D6 if you want.
Comment #10
aharown07 commentedI'd also love to see this time limit feature, though this is already a great module.
Comment #11
aharown07 commentedAnybody got a d6 patch? Or if someone can verify that the D5 patch works, I might eventually muster up the courage to try Coder etc. and port it to D6. It looks about the right size for my first ever conversion to D6.
Comment #12
snufkin commentedThis is a d6 only module at the moment, what D5 patch do you mean?
Comment #13
aharown07 commentedThe one in #5 that is supposed to time-limit editing
Comment #14
snufkin commentedah #9 you mean. If there is such a need for this feature i'll implement it, I just never assumed it would be really useful for people.
Comment #15
aharown07 commentedYes, 9. Thanks. Yeah, it's especially attractive to people who are moving to Drupal from one of the major bulletin board type systems out there. Nice to be able to stabilize the comments after a period by locking them.
Comment #16
snufkin commentedI am going to put this feature into the dev version, but I will need people to test it before I push it to be the official version, as I am not a big forum person. Could you help out testing it when its done?
Comment #17
michelle@snufkin: I'd be willing to test in a couple of weeks but there's a high probability that I will forget. If you want, you can ping me on IRC about it then.
Michelle
Comment #18
aharown07 commentedI'll test. Newbie question: how will I know when it's made it into the downloadable Dev version?
Edit: nevermind on the "how will I know" question. I'm assuming the last updated date will change on the 'release notes' page.
Comment #19
snufkin commentedThe problem with negative permissions is that permissions propagate on. Meaning if you enable that for authenticated users, then all your moderators will be applied too, which is not ideal.
Instead I will create an 'ignore time limit on [type]'. All users will be affected for time limit if you set that up on a content type, but users with this permission will be exempt.
Comment #20
snufkin commentedOkay so here it is. I don't think that a redirect would be useful, or informative. Instead I disabled the textfields in the comment, and display the error message mentioned in #9.
Please check it out to see if you like it. I don't need this feature, so its up to you how I implement it.
Commit: http://drupal.org/cvs?commit=185656
Comment #21
aharown07 commentedReady to test but I can't seem to figure out how to download this.
Edit: nevermind, I think I've got it.
Comment #22
aharown07 commentedFound a new .module file and a new .inc file, so I put those where they go. So far, I see new settings for permissions, and several new options on the Settings page.
What I don't see is where you set the time limit length. Am I overlooking that somewhere?
Edit: found it.... Content Type -> Comment settings.
Comment #23
snufkin commentedYeah i should make that clearer I think.
Comment #24
aharown07 commentedOK, I'm getting errors. I think I probably haven't got all the new code in place properly. Are there DB updates also? I only found a new .module file and a .inc file... so I just copies these over my existing files. Probably not the right way to do it.
Anyway, set up permissions, created a post, edited the post. No "edited by" text appeared. And this error appeared repeatedly.
I do not have the "use template" option enabled in Settings, if that matters.
So I'm guessing I need a new .install file too? To update/make new tables in the DB?
Comment #25
snufkin commentedAh I probably forgot to add the upgrade functions indeed, thanks!
Comment #26
snufkin commentedDid you run the update.php? The comment_edited_comments table should be on the update_6101 step, the type column should be added on the update_6102 step.
Comment #27
snufkin commentedI fixed up the update path for the database. Now the only thing I might need to worry about is pre-populating the new table, but as I think about it i might as well just leave it empty and let the new edits populate it. I am talking about the extra information (edit type, created time).
Comment #28
aharown07 commentedTks for the update. Will test when you have something ready again.
Comment #29
snufkin commentedThere is ready dev tarball, it has fixed database upgrades in it, so it would be nice to test. Just dont forget to run update.php after you installed the new version!
Comment #30
aharown07 commentedI'm still a bit foggy on how the whole cvs thing works... can you post me a link to the tarball. I'll be sure I have all the files that way.
Comment #31
michellehttp://drupal.org/node/350131
You can also find it linked to on the project page. ;)
Michelle
Comment #32
aharown07 commentedAh... it's an updated dev. That I can do! ... last time I ended up on some kind of cvs screen trying to find the newest versions of the project files and wasn't sure I had them all. Maybe I just didn't wait long enough? Anyway, thanks for the link.
Comment #33
aharown07 commentedOK, installed (ran update.php), tested a bit. Before I could edit a comment, I went to an existing test thread (as a regular authenticated user). As soon as I entered the thread, notice appeared onscreen: "Sorry, the time limit for editing this has run out." ... and it doesn't allow creating comments at all.
However, doesn't do this on all threads. It seems to have someting to do w/the content type. I have a custom content type 'article' I used in forums. The message does not appear on these.
Checked access control for forum post content type... seems correct. So will have to study this some more.
Also rebuilt permissions and flushed caches. Still getting this message and can't post comments.
Can create forum topics, but can't post comments on them.
In the 'article' content type threads where I can post comments, the "edited by" info does not appear when I edit. Out of time for tonight, but when I get a chance will look closely at what's the same vs. different in the permissions on these content types (I am using content access for role-level permissions on content types).
Comment #34
aharown07 commentedChecked out access control on both content types ('article' and 'forum post') and they are identical. And I have test posts of both types in the same forum.
What's different is that I didn't have a time limit keyed in under comment settings for 'article' content type.
Entered a value, and now it's behavior matches that of 'forum post.'
Not sure what other info would be helpful.
Comment #35
aharown07 commentedAnybody else having trouble w/the time limit?
Comment #36
snufkin commentedI think there was a bug in the code related to the condition check for the time limit. 0 time limit was interpreted as valid time limit, I think I fixed it, tested locally with other content types and looked fine. Commit just went in, if you could take a look at the new tarball when its updated it would be great.
For the time being I added a drupal message so when you are editing comments on a topic that has valid time limit enabled it says so, this is a debugging help and it will be removed later.
Comment #37
aharown07 commentedIt's still behaving as before... except that now it says "time limit enabled" first, then just below it "sorry the time limit for editing this has run out"
As before, the "has run out" message appears immediately when the user enters the thread... and the comment entry form does not allow input.
Comment #38
snufkin commentedwhat is the value for the time limit on the content type on which the reply is that you try to edit? Its the content-type settings form -> comment settings, top of the list.
Comment #39
simonmd commentedSame here, inmediately after entering the edit form the "has run out" message appears and no editing is allowed. I've tried with 90 second timeouts configured on my content type page.
Comment #40
snufkin commentedaah i think i understood the problem now: you had the comment entry form displayed within the thread.
Well that is the intended behaviour, if you click on edit comment on an existing thread where you set up time limit, that limit will be checked from the last update time of that comment, and thus if its older than 90 sec you wont be able to edit it.
Having said that now i see that I had a bug so that the time limit also applied to the NEW comment forms. This is fixed now.
Comment #41
aharown07 commentedThat makes sense. Will test as soon as the commit is avail.
Comment #42
aharown07 commentedTime limit seems to be working properly now. Allows when it should. When time expires, the "time has run out" shows.
One problem: the "last edited..." info is not getting appended to the comments.
I do not have "use tmplate variable" enabled, so that may be working, but the default edit msg in the comment is not working for me.
Edit: my mistake. Forgot to give test user "view edit message" permission. It's working fine.
Comment #43
snufkin commentedGreat. Now all we need is some fine documentation so the users dont get scared away from the new features and know how to use them. Updating the title accordingly.
Comment #44
aharown07 commentedPossible problem w/time limited editing: on latest dev version, edits by user 1 don't seem to get the "edited by..." Not sure why. Module is configured to show all edits. Not a big deal, probably since most ppl aren't going to use user 1 account for moderating and stuff.
Comment #45
snufkin commentedThat is normal and by design. user 1 is exempt from all the access checks, so i would have to hardcode some solution for that user, moreover I think it would encourage bad admin behaviour (users should not use in general their site as user 1).
Comment #46
aharown07 commentedThat makes sense. Thanks.
Comment #47
snufkin commentedREADME.txt added, new release created.