The new field-able comments in Drupal 7 are great, and a big improvement over Drupal 6, bridging the gap between regular comments and the nodecomments module. However, there are two areas where nodecomments and Drupal 6 have a big advantage, which is that they can allow for different types of comments on a per-node basis, (the other big advantage is being able to use views to theme comments). On regular entries, the comments can just be called comments, but on other content types, you can call them "reviews" or "answers" or "discussions".

While using views to theme comments is best-handled by an add-on, as views is not included by default, I feel like comment types is something that would be best handled in core. When looking at the structure of the content types, the "comment" and "subject" fields are really the only ones that can't be customized. Content type, title, body, and comment body can all have custom names, so it seems a bit strange that comment and subject are hard-wired.

Comments

Damien Tournoud’s picture

Comments have types ("bundles"). By default, the bundle of a comment is the type of the node it is attached to. This allows to have a different set of fields for each comment type and to theme them differently.

I'm not sure there is anything left to do here.

NathanM’s picture

Can we name the "bundles" anywhere? I know you can theme the individual fields, but I can't find anywhere where I can rename the "comments" for node type x to "reviews". I can change the comment body to say "reviews", but that isn't quite the same thing. Basically, I'd like for the "add comment" link on each node type to be different, so on node type x it would say "Add a new comment" but on node type y it would say "Add a new review" and on node type z it would say "Add a new reply".

Jax’s picture

I need this as well and think the architecture allows for it. The problem is that the comment.module code assumes that there is at most one comment bundle per node bundle. This is obvious from the URLs used and the node_comment_statistics also isn't equipped for multiple comment bundles.

In the Comment display & Comment fields tabs we could have a second level of tabs which shows the different comment bundles.

I'll do a little test if Drupal keeps working when you create a new comment bundle by code.

dixon_’s picture

Version: 7.x-dev » 8.x-dev
dixon_’s picture