You are here

function discussthis_token_list in Discuss This! 5

Same name and namespace in other branches
  1. 6 discussthis.module \discussthis_token_list()

Implementation of hook_token_list provides a list of tokens this module makes available

Parameters

type the context of the tokens being requested:

Return value

array of tokens grouped by context

File

./discussthis.module, line 320

Code

function discussthis_token_list($type = 'all') {
  if ($type == 'discussthis' || $type == 'all') {
    $tokens['discussthis']['node-link'] = t('A link to the original node under discussion.');
    $tokens['discussthis']['node-title'] = t('The title of the original node.');
    $tokens['discussthis']['node-type-name'] = t('The name of the original node\'s type.');
    $tokens['discussthis']['node-type'] = t('The original node\'s type.');
    $tokens['discussthis']['node-teaser'] = t('Node teaser');
    $tokens['discussthis']['node-body'] = t('Node body');
    $tokens['discussthis']['node-body-50'] = t('First 100 characters of a body');
    $tokens['discussthis']['node-body-100'] = t('First 100 characters of a body');
    $tokens['discussthis']['node-body-200'] = t('First 200 characters of a body');
    $tokens['discussthis']['node-body-400'] = t('First 400 characters of a body');
    return $tokens;
  }
}