MyBB Community Forums

Full Version: How do I link my name to my profile?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB,

I'm wondering, how do I make it so that the Welcome Back text is linked back to my name?
Such as this:
Welcome back, Ginji. You last visited: ...
I'd like to make it so that the name Ginji is linkbacked to my user profile.

Regards, Ginji.
No one has responded, so I thought I'd give it a try. This isn't the perfect solution, and I'm sure someone else can come up with something better...but here is what I came up with.

Go into your header_welcomeblock_member template in ACP and find:

{$lang->welcome_back}

and replace with:

<a href="member.php?action=profile&uid={$mybb->user['uid']}">{$lang->welcome_back}</a>

Though this won't only link your name...It will link the whole welcome back line up until the UserCP link. I don't know of any other way to do it. Sorry! Big Grin
MyBB,
Thanks. In inc\languages\global.lang.php:
Just find:
$l['welcome_back'] = ...

and replace that line with:
$l['welcome_back'] = "<strong>Logged in as: <a href=\"member.php?action=profile&uid={$mybb->user['uid']}\">{1}</a></strong>.

Regards, Ginji.
Your better off to edit the templates so when you need to upgrade, though's changes will be erased because you will need to over write that file.
Ginji Wrote:MyBB,
Thanks. In inc\languages\global.lang.php:
Just find:
$l['welcome_back'] = ...

and replace that line with:
$l['welcome_back'] = "<strong>Logged in as: <a href=\"member.php?action=profile&uid={$mybb->user['uid']}\">{1}</a></strong>.

Regards, Ginji.

You do know that doesn't work ?

Open global.php

Find
	// Format the welcome back message
	$lang->welcome_back = sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

Change By
	// Format the welcome back message
	$profile = "<a href=\"member.php?action=profile&uid={$mybb->user['uid']}\">{$mybb->user['username']}</a>";
	$lang->welcome_back = sprintf($lang->welcome_back, $profile, $lastvisit);
MyBB,
Thanks! It worked. And also thanks for the Edited By thing.

Regards, Ginji.