MyBB Community Forums

Full Version: Groups member colors for welcome back!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello MyBB community.

I have searched google countless times before asking here. That is also why I do not know if you can do ..

I want to welcome back the name of the user leaves the color of the corresponding group ..
The color is red for administrators because its color is always relevant group, moderators, members ... etc.


Sorry if u dont undestand im using google translate Toungue

Thanx in advance !!

Regards.
Open ./global.php and search for;
	// Format the welcome back message
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

and Change it into;
	// 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);

It'll become like this;
[attachment=24733]
Yaldaram, thanks!
I was looking for this too but my code in global.php is:
$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);
not
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

What to change?
Change this;
lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);
into;
   $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);
(2011-11-23, 06:06 AM)Yaldaram Wrote: [ -> ]Open ./global.php and search for;
	// Format the welcome back message
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

and Change it into;
	// 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);

It'll become like this;


Thanks Yaldaram, it works!! Big Grin