You are here

function signup_token_list in Signup 7

Same name and namespace in other branches
  1. 6.2 signup.module \signup_token_list()
  2. 6 signup.module \signup_token_list()

Implements hook_token_list() (from token.module)().

File

./signup.module, line 1836
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function signup_token_list($type) {
  $tokens = array();
  if ($type == 'node') {
    $tokens['node'] = array(
      'node-signup-enabled' => t('True/False for if signups are enabled on a node'),
      'node-signup-status' => t("Are signups 'open' or 'closed' for this node."),
      'node-signup-limit' => t('The signup limit for this node'),
    );
  }
  elseif ($type == 'signup') {
    $tokens['signup'] = array(
      'signup-sid' => t("The signup's unique ID number"),
      'signup-user-data' => t('Any custom fields the user filled out when signing up, rendered as HTML.'),
      'signup-user-data-raw' => t('Any custom fields the user filled out when signing up, rendered as unfiltered plain text (e.g. for ASCII e-mail).'),
      'signup-date-short' => t('The date/time when the user signed up, short date format.'),
      'signup-date-medium' => t('The date/time when the user signed up, medium date format.'),
      'signup-date-long' => t('The date/time when the user signed up, long date format.'),
      'signup-cancel-url' => t('The URL for a user to cancel their signup (if they have permission to do so).'),
      'signup-email' => t('The e-mail address for the signup (either anonymous or authenticated).'),
      'signup-anonymous-email' => t('The e-mail addressed entered for an anonymous signup, or an empty string if an authenticated user signed up.'),
      'signup-attendence' => t('If the user attended the thing they signed up for.'),
      'signup-id' => t('Site-wide numeric identifier for the signup.'),
    );
  }
  return $tokens;
}