Closed (fixed)
Project:
Activity
Version:
5.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2008 at 04:04 UTC
Updated:
4 Nov 2009 at 05:30 UTC
Activity shows these tokens to users:
function user_relationshipsactivity_token_list($type = 'all') {
if ($type == 'user_relationshipsactivity') {
$tokens['user_relationshipsactivity'] = array(
'requester-name' => t('Person who issued the request'),
'requester-id' => t('User id of the person who issued the request'),
'requester-link' => t('Link to person who issued the request'),
'requestee-name' => t('Person to whom the request was issued'),
'requestee-id' => t('User id of the person to whom the request was issued'),
'requestee-link' => t('Link to person who received the request'),
'relationship' => t('The name of the relationship'),
'relationship-plural' => t('The plural name of the relationship'),
'x-is-blah-of-y' => t('Eg: Sam is a fan of Susan'),
'x-and-y-are-blahs' => t('Eg: Sam and Susan are friends'),
'the-other-person-name' => t('In any relationship, the name of the person who is not "you". Should only be used in messages visible to the individual user.'),
'the-other-person-link' => t('In any relationship, a link to the person who is not "you". Should only be used in messages visible to the individual user.'),
);
return $tokens;
}
}
It then defines only these tokens:
$tokens = array(
'requester' => $requesters[$data['requester-uid']]['link'],
'requestee' => $requestees[$data['requestee-uid']]['link'],
'x-is-blah-of-y' => t('!sam is a @fan of !susan', array('!sam' => $requesters[$data['requester-uid']]['link'], '@fan' => $data['relationship'], '!susan' => $requestees[$data['requestee-uid']]['link'])),
'x-and-y-are-blahs' => t('!sam and !susan are @friends', array('!sam' => $requesters[$data['requester-uid']]['link'], '!susan' => $requestees[$data['requestee-uid']]['link'], '@friends' => $data['relationship-plural'])),
);
$data = array(
'requester-uid' => $relationship->requester_id,
'requestee-uid' => $relationship->requestee_id,
'relationship' => $relationship->name,
'relationship-plural' => $relationship->plural_name,
'relationship-approved' => $relationship->approved,
);
So [requester-X], [requestee-X], and [the-other-person-X] don't work because they were never defined.
Comments
Comment #1
jaydub commentedI've addressed some of the missing tokens in CVS although there
are other changes to the user_relationshipsactivity module needed
before it's ready to use.
Comment #2
sirkitree commented5.x unsupported