MyBB Tutorials

Usergroup color on welcomeblock

Submitted by Aoki, , Thread ID: 11

Thread Closed
Aoki
retired
Level:
83
Reputation:
348
Posts:
7.89K
Likes:
2.3K
Credits:
1.7K
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

Vlad
Novice
Level:
0
Reputation:
0
Posts:
22
Likes:
0
Credits:
30
21-02-2015, 08:59 AM
#2
Thanks bro i've been trying to learn how to do this.

Users browsing this thread: 1 Guest(s)