MyBB Community Forums

Full Version: Add users' avatar in welcome block?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
http://envizioned.net

As you can see, the welcome block looks a little bare, and I was wondering how I put users' avatars there beside where it says welcome.
<img src="{$mybb->user['avatar']} alt="{$mybb->user['username']}'s Avatar" />

Place that next to the code you want it in. Smile
Alright scratch that, I got it to float left, but now the text seems to go out of the container...
Could you post your code here?
<if condition=$mybb->user['uid']> 0 <then>

<td class="trow1" valign="top" nowrap="nowrap"><img src="{$mybb->user['avatar']} alt="{$mybb->user['username']}s Avatar"  style="float:left;"/>
<div class="smalltext">{$lang->welcome_back}<br />
 <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}<br />
</div>
</td>

<else />

[Image: idz0Vu.png]

The text goes out of the container. Is there anyway I can push everything a little bit left so it fits?
Replace the code inbetween the IF and ELSE with:

<td class="trow1" valign="top" nowrap="nowrap">
	<img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}'s Avatar"  style="margin: 4px;" with="60px" height="60px"/>
	<span class="smalltext">{$lang->welcome_back}<br />
	<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}<br />
	</span>
</td>
(2011-07-03, 02:54 AM)Jordan L. Wrote: [ -> ]Replace the code inbetween the IF and ELSE with:

<td class="trow1" valign="top" nowrap="nowrap">
	<img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}'s Avatar"  style="margin: 4px;" with="60px" height="60px"/>
	<span class="smalltext">{$lang->welcome_back}<br />
	<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}<br />
	</span>
</td>

That gave me this:

[Image: idzQ4W.png]
Whoops, my bad:

<td class="trow1" valign="top" nowrap="nowrap" align="left">
    <img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}'s Avatar"  style="margin: 4px;" with="70px" height="70px" style="float:left;"/>
    <span class="smalltext">{$lang->welcome_back}<br />
    <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}<br />
    </span>
</td> 

Try that Smile
That just seemed to increase the size of it all.
Screenshot?
Pages: 1 2