MyBB Community Forums

Full Version: How can I make a user's username show up based on their uid?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Basically, I want to create a link to a specific user's profile with their current username showing up based on their uid if that's possible.

For example, something like <a href="user-213">{$uid->213 ['username']}</a>. If that made no sense, please forgive me. >_<

Does anyone know how I can do it?
Hm, if you want for specific user you can make it with simple HTML. Like this:

<a href="http://www.yourforum.com/memberurl/">USERNAME</a>
If you have a board with lots of users this would be quite painful to do if you plan to have a different code for each user.
(2012-11-21, 10:05 PM)JovanJ. Wrote: [ -> ]Hm, if you want for specific user you can make it with simple HTML. Like this:

<a href="http://www.yourforum.com/memberurl/">USERNAME</a>

I know I could easily just do that, but I want where you put USERNAME to change when the person's username changes.
Do you want the colour to change?
(2012-11-21, 10:12 PM)JordanMussi Wrote: [ -> ]Do you want the colour to change?

No, that's not necessary for what I'm trying to do..
What exactly do you want to achieve then?
(2012-11-21, 10:15 PM)JordanMussi Wrote: [ -> ]What exactly do you want to achieve then?

I want a certain member's username to show up, but I want it to change when they change their username. I don't want to go back and change it every time they decide to change their username.

I said uid because I know that it will have something to do with it.
Where's it going to be showing up? That will determine what variable needs to be used.

On the Profile Itself:
<a href="{$mybb->settings['bburl']}/uid={$mybb->user['uid']}" />{$username}</a>

Username of a Poster:
<a href="{$mybb->settings['bburl']}/uid={$mybb->user['uid']}" />{$post['author']} </a>
(2012-11-22, 12:44 AM)pandaa Wrote: [ -> ]Where's it going to be showing up? That will determine what variable needs to be used.

On the Profile Itself:
<a href="{$mybb->settings['bburl']}/uid={$mybb->user['uid']}" />{$username}</a>

Username of a Poster:
<a href="{$mybb->settings['bburl']}/uid={$mybb->user['uid']}" />{$post['author']} </a>

I want it to show up on a custom page.
Pages: 1 2 3