MyBB Community Forums

Full Version: Linking to your profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to make it so you can get linked to your profile when you click your username? What i mean i where you see Welcome back, "username" if you click "username" it will link back to your profile.
You have to do some core edits to get this done.
Here are the changes:

Open inc/languages/*language you're using*/global.lang.php and find following:
$l['welcome_back'] = "<strong>Welcome back, {1}</strong>. You last visited: {2}";

Change with following:
$l['welcome_back'] = "<strong>Welcome back, <a href=\"{3}\">{1}</a></strong>. You last visited: {2}";

Open global.php and find following:
// Format the welcome back message

Add above:
$userprofilelink = $mybb->settings['bburl']."/".get_profile_link($mybb->user['uid']);

Find following:
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

And change with this:
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit, $userprofilelink);

And here we go. It's all done.
Does it work with the lastest version? or with themes other than the default one? because i don't use the default theme and have this error when i try to access my forum after editing like above:
[Image: errormybb.jpg]
Wouldn't have anything to do with version or themes, do any other pages show that error?? What about clicking another profile link somewhere??