News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Add avatar on top

Started by Propaganistas, January 20, 2009, 03:47:54 PM

Previous topic - Next topic

Propaganistas

Hiya,

I'd like to have a user's avatar displayed at the right top corner, next to the Welcome part (similar to SMF Community)

Here's the function I think that needs to be modified (extract from index.template.php):

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

  echo '
<div id="wrapper">
<div id="header">
<div id="head-l">
<div id="head-r">
  <div id="userarea">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';

// Tell users about new forum replies
echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '[<strong>', $txt['ma_tan'], '</strong>]';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
[<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] , ' ', $txt['approve_member'], '</a> ]';
echo '<br />', $context['current_time'], '';
}
else
echo sprintf($txt['welcome_guest'], $txt['guest_title']);

echo '
  </div>

<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div><br style="clear:both;"/>

<div id="toolbar">
',template_menu(),'
</div>
<div id="bdy-l">
<div id="bdy-r">
<div id="bodyarea">';

// Show the navigation tree.
theme_linktree();

}


Thanks in advance,
Propa

Tyrsson

What theme are you using since this is not the default?

Is this from the theme you are using or another?

Which version of SMF are you using?
PM at your own risk, some I answer, if they are interesting, some I ignore.

Propaganistas

It's the Reference theme, but I already adapted something slightly.

SMF version = 2.0beta4

Tyrsson

You should ask the theme author by posting here:

Reference
PM at your own risk, some I answer, if they are interesting, some I ignore.

Advertisement: