MyBB Hacks

Full Version: function $lang->sprintf()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to take the $ lang->sprintf(), but not how.
The full code that I have ..

<setvar glastuser>get_user($stats['lastuid'])</setvar>
<setvar fn_lastuser>format_name($tplvars['glastuser']['username'], $tplvars['glastuser']['usergroup'], $tplvars['glastuser']['displaygroup'])</setvar>
<setvar lastuser>build_profile_link($tplvars['fn_lastuser'], $tplvars['glastuser']['uid'])</setvar>

<setvar lastuserl>$lang->sprintf($lang->stats_newestuser, $tplvars['lastuser'])</setvar>

As I can do? Thanks in advance.
Unfortunately you can't - in general Template Conditionals doesn't allow member calls.
You could try using str_replace as an alternative:

Code:
<setvar lastuserl>str_replace('{1}', $tplvars['lastuser'], $lang->stats_newestuser)</setvar>

Reference URL's