You are here

function vote_up_down_nodeapi in Vote Up/Down 6

Same name and namespace in other branches
  1. 5 vote_up_down.module \vote_up_down_nodeapi()

Implementation of hook_nodeapi().

File

./vote_up_down.module, line 215

Code

function vote_up_down_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  switch ($op) {
    case 'view':
      $widget = vote_up_down_widget_form($node);
      if (!empty($widget)) {
        $node->content['vote_up_down'] = array(
          '#value' => $widget,
          '#weight' => -10,
        );
      }
      break;
  }
}