'votingapi', 'module' => 'votingapi', 'ops' => array('mark', 'unmark'), 'types' => array_values($tags), 'tokens' => array( 'user' => 'user who done the action', 'node-id' => 'id of what was voted upon', 'node-title' => 'title of what was voted upon', 'rating' => 'rating data', ), ); } /** * Implementation of hook_votingapi_insert() */ function votingapiactivity_votingapi_insert() { global $user; $args = func_get_args(); $node = node_load($args[0]->content_id); // it's safe to set this to 'mark' since we're only implementing hook_votingapi_insert() $action = 'mark'; $type = 1; $token = array( 'user-id' => $user->uid, 'user-name' => $user->name, 'node-id' => $args[0]->content_id, 'node-title' => $node->title, 'rating-value' => $args[0]->value, 'rating_type' => $args[0]->value_type, ); activity_insert('votingapi', $type, $action, $token); }