MyBB Community Forums

Full Version: How to make "Welcome Back to Example, test!" a link to their profile?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I haven't tried it yet, and will do so when I get spare time. Smile
I've just tried a second time with a different variable and it doesn't work so I don't think it works, not sure why since it has double quotes instead of single quotes but still, it's not working.
Yeah, fiddled around with different MyBB variables and it doesn't want to display the UID Undecided
You don't need the UID because member.php?action=profile does the same thing...I modified your code to:

$l['welcome_back'] = "<strong>Welcome back, <a href=\"{$mybb->settings['bburl']}/member.php?action=profile\">{1}</strong>. You last visited: {2}"; 

but it still didn't work Sad

I can't believe this isn't working..how are users supposed to view their profiles the way others see it without manually typing in the URL or having to go find a post/thread of theirs and clicking on their username?
Go to UCP -> click your Username.
Many people have tried this and I think several people have said the easiest (And possibly) only way to do this is by:

Edit the global.lang.php file (in inc/languages/english/global.lang.php), and find this line:
$l['welcome_back'] = "<strong>Welcome back, {1}</strong>. You last visited: {2}";
Replace that with this:
$l['welcome_back'] = "<strong>Welcome back, <a href=\"member.php?action=profile\">{1}</a></strong>. You last visited: {2}";
I tested it, and it works. Smile
*Credits to Splappy
Guys, what you've been telling me this entire time is how to change it for the default theme only. If you're not using the default theme then this may not work.

To get the link to appear, I fiddled around with it and did this and it worked:

Go to ACP > Templates & Styles > Templates > {Select your custom theme} > Header Templates > header_welcomeblock_member

And then replace:

Welcome Back to {$mybb->settings['bbname']} {$mybb->user['username']}!

with:

Welcome Back to {$mybb->settings['bbname']} <a href="{$mybb->settings['bburl']}/member.php?action=profile"/>{$mybb->user['username']}!</a>
What i did to get this to work is go in to acp>languages
edited global.lang.php
found welcome_back in the list and entered
<strong>Welcome back, <a href="member.php?action=profile">{1}</a></strong>. You last visited: {2}

and that works globaly not just in one theme.
I already have that in my global.lang.php and it doesn't work (it doesn't make the username a link)
 <a href="member.php?action=profile&uid={$mybb->user['uid']}">{$lang->welcome_back}</a>

Just add that wherever you want it to show in the header_welcomeblock_member template.

Replace {$lang->welcome_back} with {$mybb->user['username']} if you want to just show their username as the link.

Works for me, I use this on my forum.
Pages: 1 2 3