Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] change what's in the...
#1
Not Solved
How do you change what's in the {1} {2} etc?
#2
Not Solved
They're passed to the method call MyLanguage::sprintf(). The first argument is the language key and the ones that follow are what the placeholders will be replaced with.

Example:

$lang->sprintf($lang->generated_in, $totaltime, $querycount, $memory_usage);

$totaltime is {1}, $querycount is {2}, and so on.
No longer involved in the MyBB project.
#3
Not Solved
(2013-06-16, 10:15 PM)Nathan Malcolm Wrote: They're passed to the method call MyLanguage::sprintf(). The first argument is the language key and the ones that follow are what the placeholders will be replaced with.

Example:

$lang->sprintf($lang->generated_in, $totaltime, $querycount, $memory_usage);

$totaltime is {1}, $querycount is {2}, and so on.

So where would that be at?
#4
Not Solved
(2013-06-16, 10:20 PM)MYBB GHOST Wrote:
(2013-06-16, 10:15 PM)Nathan Malcolm Wrote: They're passed to the method call MyLanguage::sprintf(). The first argument is the language key and the ones that follow are what the placeholders will be replaced with.

Example:

$lang->sprintf($lang->generated_in, $totaltime, $querycount, $memory_usage);

$totaltime is {1}, $querycount is {2}, and so on.

So where would that be at?

Wherever you want it to be. Wink $lang->sprintf() is a type of function, where it is called is dependant on what you want to change. Like the line Nathan mentioned, it's at about line 171 in admin/inc/class_page.php, it is for the text at the bottom of the Admin CP (Generated in 0.0003523456 seconds with 9 queries, for example).
Please don't PM me for support. Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)