MyBB Tutorials

Usergroup color on welcomeblock

Submitted by Aoki, , Thread ID: 11

Thread Closed
15-01-2015, 12:41 AM
#1
MyBB 1.6.3 and below

Open ./global.php and search for:

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

Replace it with:

Code:
// Format the welcome back message$formatted_username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);$lang->welcome_back = $lang->sprintf($lang->welcome_back, $formatted_username, $lastvisit);

MyBB 1.6.4 and above

Open ./global.php and search for:

Code:
lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);

Replace with:

Code:
$formatted_username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($formatted_username, $mybb->user['uid']), $lastvisit);

RE: Usergroup color on welcomeblock

#2
Thanks bro i've been trying to learn how to do this.

Users browsing this thread: 2 Guest(s)