content profile title token issue (trying to write own module) /**
* Implementation of hook_token_values().
*/
function content_profile_token_token_values($type, $object = NULL, $options = array()) {
  $values = array();
  switch ($type) {
    case 'user':
      if (isset($object)) {
        $account = user_load(array('uid' =&gt; $object-&gt;uid));
      }
      else {
        global $user;
        $account = user_load(array('uid' =&gt; $user-&gt;uid));
      }


      $node_profile = content_profile_load('profile', $account-&gt;uid);
      $values['profile'] = ($node_profile-&gt;title) ? $node_profile-&gt;title : '';     


      break;
  }
  return $values;
}

/**
* Implementation of hook_token_list().
*/
function content_profile_token_token_list($type = 'all') {
  if ($type == 'user' || $type == 'all') {
    $tokens = array();
    $tokens['user']['profile'] = t('Profile title of authors content profile');

    return $tokens;
  }
}


I have created a module, and added a .info file as intended, but when I check the token list for a image field title I don't see any of the tokens implemented by my module.
What am I doing wrong?

UPDATED!!!

Now i see my token in imagefield token list, but it doesnt works == doesnt add content profile title for img...
It is not appearing because the ImageField module is using user tokens, for the image title, while your module is defining node tokens.
You can see this from the code in imagefield_widget.inc (imagefield_widget_settings_form()), which is the following one:

  $form['title_settings']['title_type'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Input type'),
    '#options' =&gt; array(
      'textfield' =&gt; 'textfield',
      'textarea' =&gt; 'textarea'),
    '#default_value' =&gt; !empty($widget['title_type']) ? $widget['title_type'] : 'textfield',
    '#description' =&gt; t('Choose type of field to be displayed to the user.'),
  );
  $form['title_settings']['title'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Default Title text'),
    '#default_value' =&gt; !empty($widget['title']) ? $widget['title'] : '',
    '#description' =&gt; t('This value will be used as the image title by default.'),
    '#suffix' =&gt; theme('token_help', array('user')),
  );


The tokens you define in your module are node tokens, which are not shown when the code calls theme('token_help', array('user')).