Jump to content

Comment module hook


Frank Vèssia
 Share

Recommended Posts

Those status values are just meant to indicate the comment's moderation status whether spam, pending or approved. They aren't bitmask flags like a Page status, so I don't think it's a good candidate for what you are trying to do unless your statuses would supersede the built-in ones. You might instead want to designate a certain email address or IP address to indicate a system comment. These fields are already built-in and can potentially be repurposed. You can modify any of the values before a comment is saved by hooking before one of the functions in FieldtypeComments.module. I would recommend either sleepValue or savePageField, both of which are called before a comment is saved. Another alternative is to copy and rename the FieldtypeComments.module or all of the comment module files to make your own customized comments module. If you go that route, you'll need to rename the classes. I know that Nico has done this, so you may want to look at what he's done with it as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...