Good document markup helps, looks like you were missing a ; on your line 7, I added it, formatted it, and moved the require_once inside of the conditional.
PHP Code:
if (THIS_SCRIPT == 'private')
{
require_once('./includes/functions_user.php');
$avid = $pm['fromuserid'];
if ($avid == $vbulletin->userinfo['userid'])
{
$avid = $pm['touserid'];
}
$pm[avatarurl] = fetch_avatar_url($avid);
if (!$pm[avatarurl])
{
$pm[avatarurl] = $stylevar['imgdir_misc'] . 'images/misc/unknown.gif';
}
else
{
$pm[avatarurl] = $vbulletin->options['bburl'] . '/' . $pm[avatarurl][0];
}
}