function ad_channel_nodeapi in Advertisement 6.2
Same name and namespace in other branches
- 5.2 channel/ad_channel.module \ad_channel_nodeapi()
- 6.3 channel/ad_channel.module \ad_channel_nodeapi()
- 7 channel/ad_channel.module \ad_channel_nodeapi()
Implementation of hook_nodeapi().
File
- channel/
ad_channel.module, line 534 - Ad Channel module.
Code
function ad_channel_nodeapi($node, $op, $arg = 0) {
switch ($op) {
case 'view':
return _ad_channel_view_node($node);
case 'load':
return _ad_channel_load_node($node);
case 'insert':
case 'update':
if (is_object($node) && isset($node->adtype) && isset($node->nid)) {
return _ad_channel_save_node($node);
}
break;
case 'delete':
return _ad_channel_delete_node($node);
case 'validate':
return _ad_channel_validate_nodes($node);
}
}