MyBB Community Forums

Full Version: Format the welcome back message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could anybody help me to construct link to user profile in the header?

// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, "<a href=\"".build_profile_link($mybb->user['username'], $mybb->user['uid'])."\">{$mybb->user['username']}</a>", $lastvisit);

// Format the welcome back message
	$user['profilelink'] = build_profile_link($user['username'], $user['uid']);
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, "<a href=\"{$user['profilelink']}\">{$mybb->user['username']}</a>", $lastvisit);

// Format the welcome back message
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, "<a href=\"{$mybb->user['uid']}\">{$mybb->user['username']}</a>", $lastvisit);

Nothing seem to work but. By the way this is from global.php

Thanks very much guyz but I just nail it with this one man I love myself just joking my PHP still sucks Smile

// Format the welcome back message
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, "<a href=\"".get_profile_link($mybb->user['uid'])."\">{$mybb->user['username']}</a>", $lastvisit);
but why not just do it in the template?

<a href="{$mybb->settings['bburl']}/member.php?action=profile" class="someclass">{$mybb->user['username']}</a>
Thanks very much the reason is cause I like the ULR look default domain.com/user-helloworld