diff --git a/forum_access.node.inc b/forum_access.node.inc index 3ce9f4e..228d25a 100644 --- a/forum_access.node.inc +++ b/forum_access.node.inc @@ -23,6 +23,7 @@ function _forum_access_node_view_alter(&$build, $tid) { $node = $build['#node']; if (forum_access_node_access($node, 'create', $user) == NODE_ACCESS_DENY) { unset($build['links']['comment']['#links']['comment-add']); + $build['links']['comment']['#links']['comment-add'] = array('title' => theme('comment_post_forbidden', array('node' => $build['#node'])),'html' => TRUE,); unset($build['comments']['comment_form']); } //dpm($build, '_forum_access_node_view_alter() AFTER:'); @@ -43,6 +44,7 @@ function _forum_access_comment_view_alter(&$build, $tid) { if ($user->uid != 1 && !user_access('bypass node access') && !forum_access_access('create', $tid)) { unset($links['comment-reply']); + $links['comment-reply'] = array('title' => theme('comment_post_forbidden', array('node' => $build['#node'])),'html' => TRUE,); } if (!user_access('administer comments') || !empty($user->_forum_access_moderator)) { @@ -69,10 +71,10 @@ function _forum_access_comment_view_alter(&$build, $tid) { //dpm($key, '_forum_access_comment_view_alter() ADDED:'); $links[$key] = $admin_links[$key]; } - if (!$access && !empty($old_links[$key])) { +// if (!$access && !empty($old_links[$key])) { //dpm($key, '_forum_access_comment_view_alter() REMOVED:'); - unset($old_links[$key]); - } +// unset($old_links[$key]); +// } } if (is_array($old_links)) { $links = array_merge($links, $old_links);