Closed (duplicate)
Project:
Drupal core
Version:
4.7.3
Component:
comment.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2004 at 23:20 UTC
Updated:
5 Sep 2006 at 14:29 UTC
Jump to comment: Most recent file
Comments
Comment #1
tangent commentedHere is a patch.
Comment #2
(not verified) commentedHaven't tested it, but it seems identical to the changes I'd made for my experiments.
+1 for this. This is important to have if people want captchas on comments.
Other modules that I think can benefit by this: Ratings (rate the post along with commenting on it).
Comment #3
moshe weitzman commentedthis is a good direction for hook_comment(). for consistency with nodeapi, i propose splitting into 'form pre' and 'form post' operations and also adding a 'view' operation.
Comment #4
tangent commentedI agree with the commentapi thing (however it is named or done) for several reasons. In the short term though, in order to use a captcha module immediately, it wouldn't hurt to update the existing code to support the purpose since I suspect the aforementioned redesign will not happen overnight.
Comment #5
TDobes commentedThere's a similar discussion going on in another issue... one of these should be marked as a duplicate.
Comment #6
Stefan Nagtegaal commentedJust not to forget:
If such a patch like this makes it into core it would be nice to strip down the comment.module untill it is a real api.
Removing the comment moderation part into an cmoderation.module would be a good thingtm. This way we make drupal more flexible and light weight...
Comment #7
Stefan Nagtegaal commentedDuplicate of http://drupal.org/node/13539..
Comment #8
escoles commentedI'm not clear on how to apply this patch. The name of the file is "comment.form", not "comment.module"; is that simply an error? Or should I be able to find a resource somewhere with the filename "comment.form"?
Related question: If I operate on the assumption that the filename should be "comment.module" and try to run patch, I get the error message "Only garbage was found in the patch input." Does anybody know what that would mean?
Comment #9
jotarp@www.jotarp.org commentedTry this.
Comment #10
jgoerzen@changelog.complete.org commentedI'm running Drupal 4.6.0 with the attached patch 7. It has been causing me all sorts of weird session troubles. Reversing the patch makes the troubles go away.
Something is really awry here...
Comment #11
varunvnair commentedIs comment.module_7.patch still causing problems, esp with Drupal 4.6.1? Just wanted to know because I wanted to enable captchas for anon users and was thinking of applying this patch.
Comment #12
Hanu commentedThis patch works for me and my 4.6.2 installation.
Comment #13
eaton commentedThat above patch (v 9) Works for me on 4.6.2 as well. I'm using it in a new custom module to impose length limits on comments, very very useful.
Comment #14
koorneef commentedAttached patch is for CVS (post 4.6.2, dd: 2005-08-07).
Please check the patch for errors. It works on my test site but one never knows ....
Comment #15
moshe weitzman commentedit seems that the patch at http://drupal.org/node/28255 is more consistent with nodeapi and more thorough. if someone else agrees, please mark this issue as a dupe of that one.
Comment #16
tangent commentedMarking as dupe of http://drupal.org/node/28255. This issue seems to have been worked around with formapi.
Comment #17
meba commentedWell, this is duplicate, but applying that patch to Drupal 4.6.6 is a pain. Attaching this patch ported to work with 4.6.6
Comment #18
pasupathymahalingam commentedI found out that in 4.7.3, if you want to add fields into comment form you can extend it by implementing hook_comment() as follows
function _comment($comment, $op)
{
if ($op == 'form') {
$form[''] = array(
'#type' => '',
'#title' => t(''),
'#required' => TRUE,
'#weight' => 0,
);
return $form;
}
}
Comment #19
wundo commented4.7 Branch already support comment hook.