Аctually I want to list comments for nodes myself (by Views, for example), so I need to hide standard comments list from core comment module. I can do it like that:
unset($node['comments']['comments']);
But it will not prevent DB query for comments.
So I found some crazy ways to trick the comments module. For example, to set fake $node->preview
property, or to create new view mode and overwrite standard node/%node
callback.
Is it really so difficult to hide comments below the node but still allow to add new comment, or I missed something?
Update about “Hidden” option
What about “Hidden” value for the content type:
I need close/open behaviour for my comments. But if I set “Hidden” for my content type, my new content pieces are set to “Comments closed” instead of hidden (here is the code).
Another problem is that user with permission to “post comments” can't add a comment, if comments are hidden (here is the code).
So I can't get the idea.
Answer
Solution found with hook_module_implements_alter()
. Thanks a lot!