This module effectively switches a node from full to teaser display when it is premium content displayed to non premium users. We would like comments displayed both when premium viewed by premium roles and when viewed by non premium roles. I looked at ways to change the display of the comments and did not see anything obvious.

For preview, Comments adds comment info to the links area in comment_node_view($node, $view_mode). For the full display, Comments adds comments to nodes in the same function using the following code. I cannot see any problem with applying comment_node_view() by hand with a fake view mode of 'full'.

($node->comment && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
      $node->content['comments'] = comment_node_page_additions($node);
}

Will a modification of this type break anything else? Could it be added as an option or an add-on module?

Comments

anrikun’s picture

Category: support » feature

This is a bit specific. Most people won't want comments of premium nodes to be displayed to non-premium users.
Might be interesting to have an option, I don't know. Need other users' opinions here.
In the meantime, I think that how you did it is the best way. You should just move this modification into a custom module so that you don't have to patch the original module.