Frank Vèssia Posted December 10, 2012 Share Posted December 10, 2012 It's possible to add an hook to comments module for adding additional status values ? I need to add 2 status to comments, "system comment" and "quote comment", status=2, status=3. Link to comment Share on other sites More sharing options...
ryan Posted December 17, 2012 Share Posted December 17, 2012 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 More sharing options...
Frank Vèssia Posted December 17, 2012 Author Share Posted December 17, 2012 Thanks Ryan, I copied the comment module and modified as my needs, that's the best solution 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now