--- token_node.inc_orig Mon Apr 20 18:42:06 2009 +++ token_node.inc Sun May 10 16:55:04 2009 @@ -50,6 +50,16 @@ function node_token_values($type, $objec $values['d'] = date('j', $date); } +//added from workflow: + $values['status'] = $node->status ? t('yes') : t('no'); + $values['promote'] = $node->promote ? t('yes') : t('no'); + $values['sticky'] = $node->sticky ? t('yes') : t('no'); + if (module_exists('path') && $node->path) { + $path = $node->path ? $node->path : 'node/'. $node->nid; + $values['path'] = check_plain($node->path); + $values['path-raw'] = $node->path; + } + if (isset($node->changed)) { $date = (int)$node->changed; $values['mod-yyyy'] = date('Y', $date); @@ -211,6 +221,15 @@ function node_token_list($type = 'all') $tokens['node']['menu-raw'] = t("The name of the menu the node belongs to. WARNING - raw user input."); $tokens['node']['menupath'] = t("The menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /."); $tokens['node']['menupath-raw'] = t("The unfiltered menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /. WARNING - raw user input."); + // added workflow tokens + $tokens['node']['status'] = t('Whether the node is published. (@yes/@no)', array('@yes' => t('yes'), '@no' => t('no'))); + $tokens['node']['promote'] = t('Whether the node is promoted to the front page. (@yes/@no)', array('@yes' => t('yes'), '@no' => t('no'))); + $tokens['node']['sticky'] = t('Whether the node is sticky at the top of lists. (@yes/@no)', array('@yes' => t('yes'), '@no' => t('no'))); + $tokens['node']['path-raw'] = t('The URL alias of the node WARNING - raw user input.'); + $tokens['node']['path'] = t('The URL alias of the node.'); + + + return $tokens; } }