News:

Wondering if this will always be free?  See why free is better.

Main Menu

No welcome "name" at top

Started by Ganx, January 16, 2009, 11:25:05 AM

Previous topic - Next topic

Ganx

Hi guys, Using extreme61 theme in SMF2 B4 At the top right, "Welcome guest" is fine but as soon as you are logged in, it no longer reflects WELCOME "YOUR USER" Not so i sure i like that!

This is the code related:
Quote// If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
          <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
          <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

   }
   // Otherwise they're a guest - send them a lovely greeting...
   else
      echo sprintf($txt['welcome_guest'], $txt['guest_title']);

   // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
            <b>', $txt['maintain_mode_on'], '</b><br />';

Anyone help with mod on this code please. Thanks!

KahneFan

Try this...

// If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
          <li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li><br />
          <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
          <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

   }
   // Otherwise they're a guest - send them a lovely greeting...
   else
      echo sprintf($txt['welcome_guest'], $txt['guest_title']);

   // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
            <b>', $txt['maintain_mode_on'], '</b><br />';
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Ganx

Hi Kahnefan
Thanks for the reply and yes worked great!
So simple when you know how  :D
Cheers
Ganx

KahneFan

;)

As a tip, if you need something that you've seen on another theme, just take a look at that themes coding and you can probably pull it out.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Advertisement: