Re: [Theme release]Urban
Thanks for the help. I wonder how long it took you to figure out all the forum calls. I tried to do it without injecting the code you provided but I could not. I was able to get the avatar by calling "$forum_page['avatar_markup']" but it only showed up when clicked on "Profile". It did not show up on other pages such as Index, Search ...
Anyways, I have successfully done it using your code. I also twisted the code just a bit so that it does not require an external PHP file (Urban1.php in your case). It would work the same way. Put this block of codes in the "header.php" line 192 (within the Else. Remember to add {} to have multiple lines)
else
{
$visit_elements['<!-- forum_welcome -->'] = '<p id="welcome"><span>'.sprintf($lang_common['Logged in as'], '<strong>'.forum_htmlencode($forum_user['username']).'</strong>').'</span></p>';
switch ($forum_user['avatar'])
{
case FORUM_AVATAR_GIF:
$avatar_filename = $forum_user['id'].'.gif';
break;
case FORUM_AVATAR_JPG:
$avatar_filename = $forum_user['id'].'.jpg';
break;
case FORUM_AVATAR_PNG:
$avatar_filename = $forum_user['id'].'.png';
break;
case FORUM_AVATAR_NONE:
$noavatar = TRUE;
break;
default:
$noavatar = TRUE;
break;
}
if(!isset($noavatar))
echo '<a href="' .forum_link($forum_url['user'],$forum_user['id']). '"><img id="avatar" src="' .$base_url. '/' .$forum_config['o_avatars_dir']. '/' .$avatar_filename. '"/></a>';
}
link: vphansite.com/forum