You are here

function notifications_content_node_view in Notifications 7

Implements hook_node_view().

File

notifications_content/notifications_content.module, line 191
Subscriptions to content events

Code

function notifications_content_node_view($node, $view_mode, $langcode) {

  // user has now permission to create subscriptions. exit early.
  if (!user_access('create subscriptions')) {
    return;
  }

  // View mode full and teaser is supported.
  if ($view_mode == 'full') {
    $display_option = 'node_links';
  }
  elseif ($view_mode == 'teaser') {
    $display_option = 'teaser_links';
  }
  else {
    return;
  }
  notifications_content_node_links($node, $display_option);
}