I have a situation where comments (Cobalt built-in) are only viewable by a certain group. The comments are hidden properly when a user is not in that group but the "Comments" title and the RSS icon are still shown. I find that looks odd and confusing to users not in that group. In this case I use comments for administrators to comment on the record so I don't want regular users to even know comments may exist.
In order to hide the title and icon as well, I changed line 71 in views/record/tmpl/default_comments.php from:
<?php if($this->tmpl_params['comment']->get('tmpl_core.comments_title', 1) || $this->tmpl_params['comment']->get('tmpl_core.comments_rss_button', 1)):?>
to:
<?php if(($this->tmpl_params['comment']->get('tmpl_core.comments_title', 1) || $this->tmpl_params['comment']->get('tmpl_core.comments_rss_button', 1)) && in_array($this->item->params->get('comments.comments_access_post', $this->type->params->get('comments.comments_access_post')), $this->user->getAuthorisedViewLevels())):?>
You may want to include something like that in a future release if you think it's appropriate. It looks like you had plans to add template functionality to commenting but it doesn't appear to be fully implemented yet. That would be a handy feature if you ever get the time.
I have a situation where comments (Cobalt built-in) are only viewable by a certain group. The comments are hidden properly when a user is not in that group but the "Comments" title and the RSS icon are still shown. I find that looks odd and confusing to users not in that group. In this case I use comments for administrators to comment on the record so I don't want regular users to even know comments may exist.
In order to hide the title and icon as well, I changed line 71 in views/record/tmpl/default_comments.php from:
to:
You may want to include something like that in a future release if you think it's appropriate. It looks like you had plans to add template functionality to commenting but it doesn't appear to be fully implemented yet. That would be a handy feature if you ever get the time.