Development

#2595 ([PATCH] Mixins for pre and post comment addition and fix anonymous posting)

You must first sign up to be able to contribute.

Ticket #2595 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Mixins for pre and post comment addition and fix anonymous posting

Reported by: Michael.Nolan Assigned to: xavier
Priority: minor Milestone:
Component: sfPropelActAsCommentablePlugin Version: 1.0.0
Keywords: Cc:
Qualification: Unreviewed

Description

I've attached a patch containing a fix to anonymous posting - it now uses the token.

Also added pre and post addition hooks.

sfCommentActions:addComment:pre - passes the commment values and the object the comment it to be added to. sfCommentActions:addComment:pre - passes the comment object and the object the comment has been added to.

I'd like it for a plugin I'm working on sfPropelApprovableBehaviorPlugin which will allow moderation of comments (and anything else) but it requires a way to hook into the action being performed. Sometimes this can be done by overriding the actions, but in this case you can't because it redirects after posting the comment.

Attachments

comment_hooks.patch (3.3 kB) - added by Michael.Nolan on 11/28/07 17:26:35.

Change History

11/28/07 17:26:35 changed by Michael.Nolan

  • attachment comment_hooks.patch added.

12/10/07 12:48:15 changed by xavier

  • status changed from new to closed.
  • resolution set to fixed.

Thanks Michael! I just applied your patch and released a 0.4 version of the plugin.

Cheers,

xavier