Okay, I got it to work:
PHP Code:
if (in_array(THIS_SCRIPT, array('showthread', 'vbcms')))
{
if ($memberinfo['field6'])
{
$new_name = $memberinfo['field6'];
}
else
{
global $post;
if (!$post)
{
$post = fetch_userinfo($memberinfo['userid']);
}
$new_name = $post['field6'];
}
if ($new_name)
{
$memberinfo['musername'] = str_replace($memberinfo['username'], $new_name, $memberinfo['musername']);
$memberinfo['username'] = $new_name;
}
}
Please let me know if this takes care of what you wanted to do since you are more familiar with the system.