Is there a way to display the comment box on a content type to only the node author? I am also using panels, so any php code necessary to do this is welcome. Thank you

since there is no live update module known to me for drupal 7, I want to build a content type that will be used for live updates, so when the node author creates the node, he alone will be providing updates in form of comments, the most recent comment will be presented at the top using views and refreshed at intervals. previous comments will also be displayed using another view and placed below the most recent comment.

Help is appreciated. Thanks


itpromanager’s picture

The following code worked for me under visibility settings => php code (Remove the php open and close tags, i just included them in case you might want to use the code elsewhere outside panels):

if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
  if (isset(
$node->uid, $GLOBALS['user']->uid) && $GLOBALS['user']->uid == $node->uid && $GLOBALS['user']->uid > 0) {