0

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 2

1

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 :)

1
  • 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
0

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;
    }
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.