Hi,
I would like to ask you if it's possible to add one more token for comments on status, especially token for originator of the status. At this moment I can see this token:
'commenter-uid' => t('The User ID of the user who posted the status message.'),
But I need token for user id who posted a status not a user who made a comment on the status.
Can you please add the token?
Below you can find all your added tokens:
$tokens['fbss_comment'] = array(
'commenter-themed' => t('The themed name of the user who posted the status message.'),
'commenter-name' => t('The safe name of the user who posted the status message.'),
'commenter-name-raw' => t('The raw name of the user who posted the status message. WARNING: raw user input.'),
'commenter-uid' => t('The User ID of the user who posted the status message.'),
'message-unformatted' => t('The comment text, with HTML escaped but no filters run over it.'),
'message-formatted' => t('The formatted comment text.'),
'message-raw' => t('The completely unfiltered comment text. WARNING: raw user input.'),
'comment-themed' => t('The new status completely themed, including usernames and times.'),
'comment-id' => t('The Comment ID.'),
'comment-status-id' => t('The Status ID.'),
'comment-status-url' => t('The URL of the related status message.'),
'comment-edit' => t('Edit comment link.'),
'comment-delete' => t('Delete comment link.'),
'comment-created' => t('The themed time the comment was submitted.'),
);
If you know more info don't hesitate to contact me I will send you a more info.
Thanks a lot.
BR
Lukas P.
Comments
Comment #1
icecreamyou commentedIf you are using Rules, the best way to do this is by using e.g. the "Load a Status" action, which will give you access to the tokens related to the status on which the comment was made. From there, you can additionally use the "Load a User" action if you need more tokens related to that user account.
(The actual name of the actions may be slightly different, this is off the top of my head.)
Comment #2
mathankumarc commentedI think we can add this token in 7.x, this token will be useful when sending the notifications on commenting.
For example, if we have statuses author token, then if someone comments on it, we can mention the statuses author name in the notifications like "zzz commented on yyy status".
Rather then performing two actions in rules, we can provide the ability for the users to directly use it.
Comment #3
icecreamyou commentedWell this is implicitly built in in D7 because we just specify the token type as "user" and it automatically does the loading for us if you use a token that requires a user to be loaded. We might be able to do the same thing for statuses (e.g. specify the token type as "status" and have the statuses tokens automatically loaded if necessary).
Comment #4
mathankumarc commentedYeah I forgot about that. However we can add this in D6, cause this will reduce the loads in rules. Also this will be helpful for the users who are not using rules(Worst case)
Comment #5
icecreamyou commentedNo, there are two issues with that:
It may be worth documenting how to do this in the FAQ however, because this is not the first time I've gotten this question.
Marking this issue "fixed" because I'm assuming the original request was for Rules and that question has been answered now. @darkslide, if that is incorrect feel free to reopen.