Index: token.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v retrieving revision 1.5.2.2 diff -u -p -r1.5.2.2 token.module --- token.module 11 Jan 2007 17:35:07 -0000 1.5.2.2 +++ token.module 19 Jan 2007 12:17:42 -0000 @@ -5,6 +5,15 @@ include_once('token_node.inc'); include_once('token_user.inc'); /** + * Implements hook_help(). + */ +function token_help($section) { + if ($section == 'admin/modules#description') { + return t('Provides a shared API for replacement of textual wildcards and placeholders with actual data.'); + } +} + +/** * Return the value of $original, with all instances of placeholder * tokens replaced by their proper values. * @@ -140,6 +149,7 @@ function token_token_values($type, $obje $values['site-name'] = variable_get('site_name', t('Drupal')); $values['site-slogan'] = variable_get('site_slogan', ''); $values['site-mail'] = variable_get('site_mail', ''); + $values['site-date'] = format_date(time(), 'short', '', variable_get('date_default_timezone', 0)); break; } return $values; @@ -167,6 +177,7 @@ function token_token_list($type = 'all') $tokens['global']['site-name'] = t('The name of the current Drupal website.'); $tokens['global']['site-slogan'] = t('The slogan of the current Drupal website.'); $tokens['global']['site-mail'] = t('The contact email address for the current Drupal website.'); + $tokens['global']['site-date'] = t("The current date on the site's server"); return $tokens; } @@ -209,4 +220,4 @@ function _token_get_id($type = 'global', default: return md5(serialize($object)); } -} \ No newline at end of file +}