link

Views fields relacionados con los usuarios, autores..

// En template.php
 
// Para el campo,Nodo: nombre de autor  
function phptemplate_username($object) {
  if ($object->uid && $object->name) {
    if (drupal_strlen($object->name) > 20) {
      $name = drupal_substr($object->name, 0, 15) .'...';
    }
    else {
      $name = $object->name;
    }
    if (user_access('access user profiles')) {
       // línea dónde se ha efectuado el cambio, se ha cambiado por 'user/'. $object->uid:
     $output = l($name, 'usuario/'. $object->name, array('title' => t('View user profile.')));
    }
    else {
      $output = check_plain($name);
    }
  }
  else if ($object->name) {
    if ($object->homepage) {
      $output = l($object->name, $object->homepage);
    }
    else {
      $output = check_plain($object->name);
    }
    $output .= ' ('. t('not verified') .')';
  }
  else {
    $output = variable_get('anonymous', t('Anonymous'));
  }
  return $output;
}
 
// Para el campo:  Node: Author picture
function phptemplate_user_picture($account) {
  if (variable_get('user_pictures', 0)) {
    if ($account->picture && file_exists($account->picture)) {
      $picture = file_create_url($account->picture);
    }
    else if (variable_get('user_picture_default', '')) {
      $picture = variable_get('user_picture_default', '');
    }
 
    if (isset($picture)) {
      $alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
      $picture = theme('image', $picture, $alt, $alt, '', FALSE);
      if (!empty($account->uid) && user_access('access user profiles')) {
         //la línea de cambio:
        $picture = l($picture, "usuario/$account->name", array('title' => t('View user profile.')), NULL, NULL, FALSE, TRUE);
      }
 
      return "<div class=\"picture\">$picture</div>";
    }
  }
}

hook_link y su potencia

<?php
/**
 * Implementation of hook_link().
 * 
*/
function movida_link($type, $object, $teaser = FALSE) {
 
  if ($type == 'node') {
    $node_type= variable_get('movida_'. $type, FALSE);
    if ($node_type == '1') {
      $links = array();
      $links['gears_create'] = array(
        'title' => t('Create'),
        'href' => "manifest/node_create",
      );
      $links['movida_delete'] = array(
        'title' => t('Delete offline'),
        'href' => "manifest/node_delete",
      );
      return $links;
    }
  }
}
?>

Distribuir contenido
Diseño y desarrollo INVESTIC con DRUPAL