By kalashari on
I'd like to execute hook_comment() only when a comment action is being performed on let's say 'image' node type. How do I retrieve node type when executing hook_comment() ?
I have something like:
function mymodule_comment($a1, $op) {
if ($op == 'insert' OR $op == 'delete') {
$var = 'display_album_';
cache_clear_all($var, 'cache', TRUE);
}
}
So I dont need this to be executed when commenting on any node type... just 'image' node type.
Thanks,
k.
Comments
use the nid
i think the comment stores the node id.
subscribing
subscribing