Ok, here is your solution :-)
1. As mentioned, I've upgraded
bb_cookie.php to have the following additions:
in admin's login part, I've added this to have your avatar field ('user_custom1' as by default) readable from the database:
if($row=db_simpleSelect(0,$GLOBALS['Tu'],$GLOBALS['dbUserSheme']['user_sorttopics']
[1].','.$GLOBALS['dbUserSheme']['lang uage'][1].', '.$GLOBALS['dbUserSheme']['num_posts'][1].', user_custom1',$GLOBALS['dbUserId'],'=',1))
and later in the code:
$username=$GLOBALS['admin_usr'];
$av=$row[3];
if($av!='' and $av!='*') $GLOBALS['uAvatar']="<img src=\"{$GLOBALS['main_url']
}/img/forum_avatars/{$av}\" alt=\"\" />";
elseif($av!='' and $av=='*') $GLOBALS['uAvatar']="<img src=\"{$GLOBALS['main_url']
}/shared_files/avatars/1.mbb\" alt=\"\" />";
else $GLOBALS['uAvatar']='';
For regular users:
elseif($row=db_simpleSelect(0,$GLOBALS['Tu'],$GLOBALS['dbUserId'].','. $GLOBALS['dbUserSheme']['user_sorttopics'][1].','. $GLOBALS['dbUserSheme']['language'][1].','. $GLOBALS['dbUserAct'] .','. $GLOBALS['dbUserSheme']['user_password'][1] .', '.$GLOBALS['dbUserSheme']['username'][1].', '.$GLOBALS['dbUserSheme']['num_posts'][1].', user_custom1',$caseComp1.$GLOBALS['dbUserSheme']['username'][1].$caseComp2,'=',$usernameSql,'',1)){
$GLOBALS['user_num_posts']=$row[6];
$av=$row[7];
if($av!='' and $av!='*') $GLOBALS['uAvatar']="<img src=\"{$GLOBALS['main_url']
}/img/forum_avatars/{$av}\" alt=\"\" />";
elseif($av!='' and $av=='*') $GLOBALS['uAvatar']="<img src=\"{$GLOBALS['main_url']
}/shared_files/avatars/{$row[0]}.mbb\" alt=\"\" />";
else $GLOBALS['uAvatar']='';
User's avatar will be associated that way with {$uAvatar} variable. I've put it in
main_header.html for your test case, you could put it under
user_logged_in.html modifying HTML output as well. For example, add
style="height:20px" to the image tag to reduce it in height upon the defined maximum (for better layout compliance), etc.
Let me know if you have further questions, and thank you for paying my dinner in advance ;-)