I want to make an option to subscribe to news within the node, node - it's maintenance team that adds news. I decided to do with the comments as flag in this case does not fit. Everything seemed to be fine, I can add the required fields in the form of comments and install the Node notify that and give the ability to subscribe to a node. But then the question I give the ability to add comments to the author node and not the whole role, and I need to limit the addition of the comment and make only the author can add nodes. anonymous and everyone else can only view and subscribe. Sorry for my English. Thanks for any help!
2 Answers
In the permissions
of Comment
you can allow Post comments
for your author role alone.For anonymous user
you can give permission of view comment
alone. Hope this helps you :)
-
I was looking away permissions for the user and tried to extend their permits for comment, but unfortunately only for expanding roles and I need specifically for the author of the node( Commented Aug 6, 2013 at 7:46
I decided to create a question of custom module with the given code:
function comment_author_form_comment_form_alter(&$form, &$form_state, &$form_id){
//dsm($form);
global $user;
//dsm($user);
if ($form['#node']->uid != $user->uid && $user->uid != 1) {
// Form alter here to unset comment form
$form['#access'] = FALSE;
}
}