I'm using the nodewords, realname, and content profile modules. I have realname set to use the content profile field, and this works everywhere except the user profiles. If I use realname tokens in nodewords for the user profile page meta tags, I get the person viewing the page info instead of the owners. In other words, if I view another persons profile pages, I see my name in the title and other meta tags, not the owner of the profile I'm viewing. I asked this over at nodewords to see if others have seen this, but I think it might be an RealName's issue.

Comments

wxman’s picture

I'm also using the token [realname] in pathauto for the URL of the user's profile. That also is working as expected.

oskar_calvo’s picture

Status: Active » Needs review

I build this token.

<?php
function module_token_values($type, $object = NULL, $options = array()) {
  $values = array();
  switch ($type) {
    case 'user':
    //verificamos que sea la página correcta.
    if( (arg(0) == 'user') && (is_numeric(arg(1)))){
      $watching_user = user_load(arg(1));
      $values['watching-user-page'] = $watching_user->realname;
    }

  break;

  }
  //check if there are values.
  if (count($values)){
    return $values;
  }
}


function module_token_list($type = 'all') {
if ($type == 'user' || $type == 'all') {
    $tokens['user']['watching-user-page']             =t('User-page realname author ');

  }
  //check if there are values.
  if (count($tokens)){
    return $tokens;
  }
}
?>

I hope this help you.

Oskar

hass’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)