MyBB Community Forums

Full Version: Username in templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a code with help of Template Conditionals plugin.
        <td class="{$alt_bg}" align="center">
        <if $user['fid5'] then>
        <a href="http://beta.xfire.com/profile/{$user['fid5']}"> {$user['fid5']}</a> <a href="xfire:add_friend?user={$user['fid5']}"><img src="http://i53.tinypic.com/28r2r2h.png" title="Add this user to your XFire friends!"></img></a>
       <else>
        -
       </if></td>

Everything works fine http://board.twcclan.org/memberlist.php but I'd like to change one thing - username instead of 'this user' in img title. Tried already {user['username']} but it fails probably because 'username' is href. How to do it?
Not sure if this is what you mean (sorry, it's really late here)
{$mybb->user['username']}
This one prints your own name in all titles. I mean a variable with specific user username as plaintext.
Something like this:
<img src="img_url" alt="" title="Add <func htmlspecialchars_uni><func strip_tags>{$user['username']}</func></func> to your XFire friends!" />
Thanks, worked well.