You are here

function rotor_nodeapi in Rotor Banner 7

Same name and namespace in other branches
  1. 6.2 rotor.module \rotor_nodeapi()

File

./rotor.module, line 190
A rotor banner consists in a set of images that will be changing. This module is made using jquery.

Code

function rotor_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($node->type == 'rotor_item') {
    switch ($op) {
      case 'load':
        _rotor_load($node);
        break;
      case 'insert':
      case 'update':
        _rotor_save($node);
        break;
      case 'view':
        $node->content['rotor_image'] = array(
          '#value' => '<div>' . theme('rotor_item', $node) . '</div>',
          '#weight' => 10,
        );
        break;
    }
  }
}