function kaltura_nodeapi in Kaltura 6.2
Same name and namespace in other branches
- 5 kaltura.module \kaltura_nodeapi()
- 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 250 - kaltura integration module - core functions
Code
function kaltura_nodeapi(&$node, $op, $teaser) {
$node_update_access = node_access('update', $node);
$show_embed = user_access('view Kaltura embed code');
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, FALSE, FALSE, $node_update_access, $show_embed, $node->type);
$node->teaser = kaltura_replace_tags($node->teaser);
break;
default:
}
}