You are here

function discussthis_token_list in Discuss This! 6

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

\brief Implementation of hook_token_list()

This function provides a list of tokens offered by this module.

\param[in] $type the context of the tokens being requested

\return array of tokens grouped by context

File

./discussthis.module, line 642
Associations discussions in forums with specific nodes

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 50 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;
  }
}