You are here

function kaltura_nodeapi in Kaltura 5

Same name and namespace in other branches
  1. 6.2 kaltura.module \kaltura_nodeapi()
  2. 6 kaltura.module \kaltura_nodeapi()

Implementation of hook_nodeapi().

All we do here is to alter the body and teaser fields when a node goes to view mode we call our functions to replcae the special "tags", which we create in theme_node_kaltura_*_entryId(), with the embed tag

File

./kaltura.module, line 215

Code

function kaltura_nodeapi(&$node, $op, $teaser) {
  switch ($op) {
    case "load":
      break;
    case "view":
      break;
    case 'search result':
      $node->body = kaltura_replace_tags($node->body, FALSE, TRUE);
      break;
    case "alter":
      $node->body = kaltura_replace_tags($node->body);
      $node->teaser = kaltura_replace_tags($node->teaser);
      break;
    default:
  }
}