'buddylist', 'module' => 'buddylist', 'ops' => array('add', 'remove'), 'types' => array(), 'tokens' => array( 'user' => 'user who added a buddy', 'user-link' => 'link to the user\'s profile', 'buddy' => 'user who was added', 'buddy-link' => 'link to the buddy\'s profile', ), ); } /** * Implementation of hook_buddylist_api() */ function activity_buddylist() { global $user; $args = func_get_args(); $action = $args[0]; $type = ''; $token = array( 'user-id' => $user->uid, 'user-name' => $user->name, 'buddy-id' => $args[1]->uid, 'buddy-name' => $args[1]->name, ); activity_insert('buddylist', $type, $action, $token); }