Override node and comment "Submitted by" info
A while back I had to come up with a way to replace the username in the "submitted by" info, since we use internal UIDs for authentication. This first bit will replace it with the user's first name and last name, assuming there are profile fields named "firstname" and "lastname".
function themename_preprocess_node(&$vars) {
$vars['submitted'] =
t('<abbr class="created" title="!microdate">@date</abbr> by !first !last',
array(
'!first' => user_load(array('uid' => $vars['node']->uid, 'status' => 1))->profile_firstname,
'!last' => user_load(array('uid' => $vars['node']->uid, 'status' => 1))->profile_lastname,
'!username' => theme('username', $vars['node']),
'@date' => format_date($vars['node']->created,'custom', "F jS, Y"),
'!microdate' => format_date($vars['node']->created,'custom', "Y-m-d\TH:i:sO")
)
);
}
$vars['submitted'] =
t('<abbr class="created" title="!microdate">@date</abbr> by !first !last',
array(
'!first' => user_load(array('uid' => $vars['node']->uid, 'status' => 1))->profile_firstname,
'!last' => user_load(array('uid' => $vars['node']->uid, 'status' => 1))->profile_lastname,
'!username' => theme('username', $vars['node']),
'@date' => format_date($vars['node']->created,'custom', "F jS, Y"),
'!microdate' => format_date($vars['node']->created,'custom', "Y-m-d\TH:i:sO")
)
);
}