I'm new to Joomla and no PHP master (yet) but I am trying to change the "Who's Online" module to display 'name' instead of username.
ex: Instead of: We have 1 member online * jsmith
ex: I want it to say: We have 1 member online * John Smith
I found this code in /modules/mod_whosonline/tmpl/default.php
Code: Select all
if(($showmode > 0) && count($names)) : ?>
<ul>
<?php foreach($names as $name) : ?>
<li><strong><?php echo $name->username; ?></strong></li>
<?php endforeach; ?>
</ul>
<?php endif;
I think I need to modify:
Code: Select all
<?php echo $name->username; ?>
to something like
Code: Select all
<?php echo $name->name; ?>
I want it to look like it does in the login module where it says: "Hi, John Smith"
I think that code is in /modules/mod_login/tmpl/default.php
Code: Select all
<div><?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?></div>
I'm sure it's something simple, but I don't have much experience with php.
Any suggestions? thanks!!
-Brian