function voting_rules_token_list in Voting Rules 6
Implementation of hook_token_list().
File
- ./
voting_rules.module, line 75 - Provides Rules intregration for the Votingapi module
Code
function voting_rules_token_list($type = 'all') {
$tokens = array();
if ($type == 'vote' || $type == 'all') {
$tokens['vote']['value'] = t("Value of the vote");
$tokens['vote']['value_type'] = t("Type of the vote value - e.g. points");
$tokens['vote']['tag'] = t("Tag of the vote");
$tokens['vote']['content_id'] = t("Id of the content being voted on (nid, uid, cid)");
$tokens['vote']['content_type'] = t("Type of the content being voted on (node, user, comment)");
$tokens['vote']['uid'] = t("User Id of the user");
$tokens['vote']['timestamp'] = t("Timestamp");
$tokens['vote']['vote_source'] = t("IP of the user");
$tokens['vote']['prepped'] = t("Prepped");
$tokens['vote']['vote_id'] = t("Id of the vote");
}
elseif ($type = 'vote_results' || $type == 'all') {
$tokens['vote_results']['count'] = t("Total number of votes");
$tokens['vote_results']['average'] = t("Average value of votes cast");
$tokens['vote_results']['sum'] = t("Sum of all votes cast");
}
return $tokens;
}