MyBB Community Forums

Full Version: $l['redirect_loggedin']
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, i have this in my languages.

Quote:$l['redirect_loggedin'] = "Thankyou for logging in";

How can I make it so that it displays the username afterwards, I know it would be.

Quote:$l['redirect_loggedin'] = "Thankyou for logging in, {1}";

but how do I get {1} to function as SHOWUSERNAME?
Not sure but try to use {$username} variable, but I think it might not work if you're editing language file, try it though.
i tried that already but it didn't work :/
Find $lang['redirect_loggedin'] in the core file and change to be:

$lang['redirect_loggedin'].", ". $mybb->user['username'];
Or, for a more cross-language friendly version:
$lang->redirect_loggedin = $lang->sprintf($lang->redirect_loggedin, $mybb->user['username']);

Which is what that {1} is for (replaces {1} with the first argument after the string, in this case $mybb->user['username']).