I have made several attempts to do it myself . but all i get is a red X .
this is the template I have so far:
<span style="float:right;"><img src="$users[avatar]" /></span>
{$lang->welcome_back} <br />{$lang->welcome_current_time}<br />(<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$admincplink} — <a href="{$mybb->settings['bburl']}/member.php?action=logout&uid={$mybb->user['uid']}">{$lang->welcome_logout}</a>)<br />
<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}
And I have added this to global.php:
if($mybbuser['avatar'])
{
$users['avatar'] = "<img src=\"".$mybbuser['avatar']."\">";
}
I have added avatars to memberlists successfully . but can't make it work in welcome box .
thanks for any help.
In global.php
if($mybb->user['avatar'])
{
$avatar = "<img src=\"".$mybb->user['avatar']."\">";
}
Use {$avatar} in your template for showing .
made the changes and now nothing shows .
Jedi Knight Wrote:made the changes and now nothing shows .
Where did you put it in global.php ?
It must be below
// Run global_start plugin hook now that the basics are set up
$plugins->run_hooks("global_start");
That did the trick , bud thanks .
I had to chang it up a bit to make everything line up .
here's the code if any one would like it .
<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td width="100%" class="thead" colspan="2" align="center"><strong>Welcome to ValorSolo Sports</strong></td>
</tr>
<tr>
<td width="100%" class="row2" align="left">
{$lang->welcome_back} <br />{$lang->welcome_current_time}<br />(<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$admincplink} — <a href="{$mybb->settings['bburl']}/member.php?action=logout&uid={$mybb->user['uid']}">{$lang->welcome_logout}</a>)<br />
<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a>
</td>
<td align="right">{$avatar}</td>
</tr>
</table>
And this is what it looks like:
This may have been easier.
No core file to edit..
<td align="right" class="trow2"><br />
<img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}" {$avatar_width_height} /></td>
The main string is the image string that gets the avatar.
And add it the header_welcomeblock_member template.
If I want to make the users Avatar in the welcome box a little smaller than it is in the forum profile, how would i change the values ?
WarBirD
Also, this is how it looks on my Site now:
But I would prefer the text not in one big line, but in 3 or so right next to the avatar, like in this Example from a SMF Forum.
If anyone could help me how to make the code like this, I would appreciate it. Atm its like this.
header_welcomeblock_member
<td align="right" class="trow2">
<img src="{$mybb->user['avatar']}" align="top" alt="{$mybb->user['username']}" {$avatar_width_height} /></td>
{$lang->welcome_back} (<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$admincplink} — <a href="{$mybb->settings['bburl']}/member.php?action=logout&uid={$mybb->user['uid']}&sid={$session->sid}">{$lang->welcome_logout}</a>)
<a href="search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}
I found out how to change the size of the displayed avatar, but how can I make the other Member Welcomepanel links in more than on line and not have all but the first line get displayed below the Avatar ?