Under the Pattern for the title field is a dropdown named Replacement patterns. CCK fields created with the Phone - CCK module do not show in this list under CCK text tokens.

Comments

fago’s picture

Project: Automatic Nodetitles » Phone
Version: 5.x-1.0 » 5.x-1.x-dev
Component: User interface » Code

then the either the phone module needs support for the token module, or the token module needs to include support for phone cck fields.

neuromusic’s picture

Version: 5.x-1.x-dev » 5.x-2.9
Category: bug » feature

I would be interested in seeing this happen

aren cambre’s picture

Version: 5.x-2.9 » 5.x-1.x-dev
Category: feature » bug

Not sure why neuromusic changed this issue? Changing it back.

akahn’s picture

Title: Phone - CCK content type not available in Replacement Patterns dropdown » Add token support for Phone module
Category: bug » feature
Status: Active » Needs review

I added the following to phone.module. It's based on the token support in email.module. Like that module, it only uses the first phone number, if it is a field that allows multiple entries. Please test this and let me know what you think.

/**
 * Implementation of hook_token_list
 */
function phone_token_list($type = 'all') {
  if ($type == 'field' || $type == 'all') {
    $tokens['phone']['phone'] = t("Phone number");
    return $tokens;
  }
}

/**
 * Implementation of hook_token_values
 */ 
function phone_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'field') {
    $item = $object[0];
    $tokens['phone'] = check_plain($item['view']);
    return $tokens;
  }
}
niklp’s picture

Basically, you need to post a patch and it needs to be for D6 for there to be any realistic chance of this getting tested, reviewed or committed.

thierry_gd’s picture

Status: Needs review » Fixed

Taken into account in 6.2.16 version

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.