Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 function $lang->sprintf()
Steeep Offline
Junior Member
**
Posts: 10
Joined: Aug 2012
Post: #1
function $lang->sprintf()
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.
(This post was last modified: 08-21-2012 10:55 PM by Steeep.)
08-21-2012 10:48 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: function $lang->sprintf()
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>


My Blog
08-22-2012 07:26 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: