[drupal-devel] [feature] Hooks for comment enhancements

moshe weitzman drupal-devel at drupal.org
Tue Aug 16 18:14:30 UTC 2005


Issue status update for 
http://drupal.org/node/28255
Post a follow up: 
http://drupal.org/project/comments/add/28255

 Project:      Drupal
 Version:      cvs
 Component:    comment.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Eaton
 Updated by:   moshe weitzman
 Status:       patch (code needs review)

i think consistency with nodeapi is important, so no 'form' operation
... this patch looks simple and useful to me.




moshe weitzman



Previous comments:
------------------------------------------------------------------------

Fri, 05 Aug 2005 05:24:26 +0000 : Eaton

Attachment: http://drupal.org/files/issues/comment.module_10.patch (2.05 KB)

I've been working on a couple modules that modify and enhance the
commenting system (file attachments in comments, and custom comment
validation for specific nodetypes). Another patch
(http://drupal.org/node/14708) would add limited form and validation
customizatoin, but this one adds nodeapi-style form_pre, form_post,
validate, and view hooks.


It's my first patch offered to the Drupal core, hope it's useful.




------------------------------------------------------------------------

Sat, 13 Aug 2005 13:54:26 +0000 : koorneef

When applied to CVS (2005-08-13):
(lucas at bsd1)/www/koorneef/test.koorneef.net/modules$ patch <
comment.module_10.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: modules/comment.module
|===================================================================
|RCS file: /cvs/drupal/drupal/modules/comment.module,v
|retrieving revision 1.364
|diff -u -r1.364 comment.module
|--- modules/comment.module     1 Aug 2005 05:14:05 -0000       1.364
|+++ modules/comment.module     5 Aug 2005 05:19:14 -0000
--------------------------
Patching file comment.module using Plan A...
Hunk #1 failed at 434.
Hunk #2 failed at 1417.
Hunk #3 failed at 1427.
Hunk #4 failed at 1469.
Hunk #5 succeeded at 1699 with fuzz 2.
4 out of 5 hunks failed--saving rejects to comment.module.rej
done


I'll see if I can update the patch ...




------------------------------------------------------------------------

Sat, 13 Aug 2005 14:34:09 +0000 : koorneef

Attachment: http://drupal.org/files/issues/comment.module_11_0.patch (2.05 KB)

Found the problem: the patch file had DOS format line-endings. Corrected
in new version: 11.


Patch applies, but captcha is not appearing on comment form (it did
with the older patches, see http://drupal.org/node/14708). Have to
investigate further ....




------------------------------------------------------------------------

Sun, 14 Aug 2005 04:48:14 +0000 : Eaton

after some investigation it appears that captcha is expecting a general
'form' $op for the hook, rathre than the 'form_pre' and 'form_post' ops
that this patch supplies.


I added the pre and post operations to mirror the nodeapi form hooks,
I'm not sure that a third general 'form' op would be a good idea. Any
thoughts?







More information about the drupal-devel mailing list