You are here

function ad_token_list in Advertisement 6.3

Same name and namespace in other branches
  1. 6.2 ad_token.inc \ad_token_list()
  2. 7 ad_token.inc \ad_token_list()

Implementation of hook_token_list().

File

./ad_token.inc, line 117
Implementations of token module hooks for the Advertisement module.

Code

function ad_token_list($type = 'all') {
  if ($type == 'ad' || $type == 'all') {
    $tokens['ad']['ad'] = t('The advertisement.');
    $tokens['ad']['aid'] = t('The ID of the advertisement.');
    $tokens['ad']['type'] = t('The type of ad.');
    $tokens['ad']['status'] = t('The status of the ad.');
    $tokens['ad']['url'] = t('The url of the advertisement.');
    $tokens['ad']['redirect'] = t('The redirection url of the advertisement.');
    $tokens['ad']['title'] = t('The title of the advertisement.');
    $tokens['ad']['comments'] = t('The number of comments attached to the advertisement.');
    $tokens['ad']['created_small'] = t('"Small" date format of when the advertisement was created.');
    $tokens['ad']['created_medium'] = t('"Medium" date format of when the advertisement was created.');
    $tokens['ad']['created_large'] = t('"Large" date format of when the advertisement was created.');
    $tokens['ad']['activated_small'] = t('"Small" date format when the advertisement was activated.');
    $tokens['ad']['activated_medium'] = t('"Medium" date format of when the advertisement was activated.');
    $tokens['ad']['activated_large'] = t('"Large" date format of when the advertisement was activated.');
    $tokens['ad']['expired_small'] = t('"Small" date format of when the advertisement was expired.');
    $tokens['ad']['expired_medium'] = t('"Medium" date format of when the advertisement was expired.');
    $tokens['ad']['expired_large'] = t('"Large" date format of when the advertisement was expired.');
    $tokens['ad']['autoactivate_small'] = t('"Small" date format of when the advertisement will be automatically activated.');
    $tokens['ad']['autoactivate_medium'] = t('"Medium" date format of when the advertisement will be automatically activated.');
    $tokens['ad']['autoactivate_large'] = t('"Large" date format of when the advertisement will be automatically activated.');
    $tokens['ad']['autoactivated_small'] = t('"Small" date format of when the advertisement was automatically activated.');
    $tokens['ad']['autoactivated_medium'] = t('"Medium" date format of when the advertisement was automatically activated.');
    $tokens['ad']['autoactivated_large'] = t('"Large" date format of when the advertisement was automatically activated.');
    $tokens['ad']['autoexpire_small'] = t('"Small" date format of when the advertisement will be automatically expired.');
    $tokens['ad']['autoexpire_medium'] = t('"Medium" date format of when the advertisement will be automatically expired.');
    $tokens['ad']['autoexpire_large'] = t('"Large" date format of when the advertisement will be automatically expired.');
    $tokens['ad']['autoexpired_small'] = t('"Small" date format of when the advertisement was automatically expired.');
    $tokens['ad']['autoexpired_medium'] = t('"Medium" date format of when the advertisement was automatically expired.');
    $tokens['ad']['autoexpired_large'] = t('"Large" date format of when the advertisement was automatically expired.');
    $tokens['ad']['max_impressions'] = t('The maximum number of times this advertisement is allowed to be viewed.');
    $tokens['ad']['max_clicks'] = t('The maximum number of times this advertisement is allowed to be clicked.');
    $tokens['ad']['global_impressions'] = t('All time impression statistics');
    $tokens['ad']['global_clicks'] = t('All time click statistics.');
    $tokens['ad']['last_year_impressions'] = t('Ad impressions last year.');
    $tokens['ad']['last_year_clicks'] = t('Ad clicks last year.');
    $tokens['ad']['this_year_impressions'] = t('Ad impressions this year.');
    $tokens['ad']['this_year_clicks'] = t('Ad clicks this year.');
    $tokens['ad']['last_month_impressions'] = t('Ad impressions last month.');
    $tokens['ad']['last_month_clicks'] = t('Ad clicks this month.');
    $tokens['ad']['this_month_impressions'] = t('Ad impressions this month.');
    $tokens['ad']['this_month_clicks'] = t('Ad clicks this month.');
    $tokens['ad']['yesterday_impressions'] = t('Ad impressions yesterday.');
    $tokens['ad']['yesterday_clicks'] = t('Ad clicks yesterday.');
    $tokens['ad']['today_impressions'] = t('Ad impressions today.');
    $tokens['ad']['today_clicks'] = t('Ad clicks today.');
    $tokens['ad']['last_hour_impressions'] = t('Ad impressions last hour.');
    $tokens['ad']['last_hour_clicks'] = t('Ad clicks this hour.');
    $tokens['ad']['this_hour_impressions'] = t('Ad impressions this hour.');
    $tokens['ad']['this_hour_clicks'] = t('Ad clicks this hour.');
    $tokens['ad']['owner_name'] = t('The username of the ad creator.');
    $tokens['ad']['owner_email'] = t('The email address of the ad creator.');
    $tokens['ad']['owner_uid'] = t('The user ID of the ad creator.');
    if (db_table_exists('ad_owners')) {
      $tokens['ad']['all_owner_names'] = t("A comma separated list of usernames of all the ad's owners.");
      $tokens['ad']['all_owner_emails'] = t("A comma separated list of email addresses of all the ad's owners.");
      $tokens['ad']['all_owner_uids'] = t("A comma separated list of user IDs of all the ad's owners.");
      $tokens['ad']['secondary_owner_names'] = t("A comma separated list of usernames of all the ad's owners minus the ad's creator.");
      $tokens['ad']['secondary_owner_emails'] = t("A comma separated list of email addresses of all the ad's owners minus the ad's creator.");
      $tokens['ad']['secondary_owner_uids'] = t("A comma separated list of user IDs of all the ad's owners minus the ad's creator.");
    }
  }
  return $tokens;
}