MyBB Community Forums

Full Version: Adding user name and Avatar to PanelContent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am trying to redefine the user box. ( panelcontent )

I've manage to find and use the codes below and added them to the header for now.
{$mybb->user['username']}
<if !$mybb->user['avatar'] then>
<elseif $mybb->user['avatar'] then>
<img src="{$mybb->user['avatar']}" width="75px" height="75px" alt="Please Login"/>
</if>

Below, is a sample of what I am trying to accomplish.
[Image: 539131_517682971605307_367387694_n.jpg]

This is the current setup @ http://unitedmodifiedtoys.juplo.com/UMT_FORUM/index.php

Currently, the code in the header is...
<!-- begin logo -->


<html>
<h1>{$mybb->user['username']}</h1>
<p>
</p>	
<if !$mybb->user['avatar'] then>
<elseif $mybb->user['avatar'] then>
<img src="{$mybb->user['avatar']}" width="75px" height="75px" alt="Please Login"/>
</if>
</html>

<a name="top" id="top"></a>
		<div id="panel">
			<div id="panelcontent">{$welcomeblock}</div>



		</div>
	</div>
	<!-- end logo -->

Thanks in advance for your help! Big Grin
I'm a little unsure of what you're asking, but perhaps a better alternative to the PHP you have is this:

<if $mybb->user['uid'] && $mybb->user['avatar'] != "" then>
<img src="{$mybb->user['avatar']}" width="75px" height="75px" alt="No avatar" />
</if>