Great theme! One suggestion - the "Logged in as " text in the upper right of the screen was coded as the username ($user->name), but would be better if it were theme('username', $user). Making this change in the page template allowed the RealNames module to replace the username using the "realname" that I set. I would suggest adding this change to your next release.

Comments

danpros’s picture

Thank you!

Okay I'll considering to add that in my next release :)

verta’s picture

I added some code to page-front.php.tpl to put the RealName in the "logged in as" area.

From research on other modules adding RealName support, I needed to add a call to theme(), and I also wrapped that in a call to striptags() as I don't want the real name or the login name hyperlinked to the profile, since we don't want that as part of this site.

(Disclaimer, I am not a PHP coder.)

Original

	<div id="authorize">
      <ul><?php global $user; if ($user->uid != 0) { print '<li class="first">' .t('Logged in as '). '<a href="' .url('user/'.$user->uid). '">' .$user->name. '</a></li>'; print '<li><a href="' .url('logout'). '">' .t('Logout'). '</a></li>'; } else { print '<li class="first"><a href="' .url('user'). '">' .t('Login'). '</a></li>'; print '<li><a href="' .url('user/register'). '">' .t('Register'). '</a></li>'; } ?></ul>
	  <?php print $feed_icons; ?>
  </div>

Replaced with:

	<div id="authorize">
      <ul>	  
	 <?php global $user; if ($user->uid != 0) { print '<li class="first">' .t('Logged in as '). strip_tags(theme('username', $user)). '</li>'; print '<li><a href="' .url('logout'). '">' .t('Logout'). '</a></li>'; } else { print '<li class="first"><a href="' .url('user'). '">' .t('Login'). '</a></li>'; 
	  // print '<li><a href="' .url('user/register'). '">' .t('Register'). '</a></li>'; 
	  } ?>
	  </ul>
	  <?php print $feed_icons; ?>
  </div>

(It's a private site, so I have the registration links commented out.)

Skidz’s picture

Just in case anyone would like to implement this with a hyperlink to the user profile, change:
{ print '<li class="first">' .t('Logged in as '). strip_tags(theme('username', $user)). '</li>';

To:
{ print '<li class="first">' .t('Logged in as '). '<a href="' .url('user/'.$user->uid). '">' .theme('username', $user). '</a></li>';

Thank you Verta!