MyBB Community Forums

Full Version: How to create custom profile bit using {$avatar} or similar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm stuck on trying to figure out how to link my avatar and username into my profile section.

This is what you see after you log into the website. I'm trying to display my own information on the left side of the page.
https://gyazo.com/ba4bc50438e991763f65f761485025fa

So I started exploring the codes behind "member_profile" template and "usercp_profile" template.

As I'm trying to find a shortcut to linking my avatar and username, I can't figure out why it doesn't work.

Avatar:
{$avatar}
<img src="{$useravatar['image']}" alt="{$lang->avatar_mine}" title="{$lang->avatar_mine}" {$useravatar['width_height']} />

or

Username: 
{$username}
<a href="#">{$formattedname}</a>

Any idea how I can make this work? I've done this before (like 3 years ago), so I'm trying to figure out how to do this again.

I'm working on adding the total amount of posts as well. 

This is my header_welcome_block so far
https://gyazo.com/9e747c97e7b212a817fb3ed70190694b


Username/Avatar/Posts not working at all. I'm obviously over-looking something wrong.
You can use this for the avatar: {$mybb->user['avatar']}

as for the formattedname, try this out: https://community.mybb.com/thread-134292...#pid971625
I can't seem to get it working for some reason.
https://gyazo.com/1b72b416bc5265439a42f8da1d21fab1

Here's what I did to my header_welcomeblock_member
https://gyazo.com/1d437239a0f95877cad16fcc5e7973ef

Any other idea? That link didn't show what I needed, it was showing how to edit that specific welcome message, but not putting it in a different place.