MyBB Community Forums
[How To?] change what's in the... - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [How To?] change what's in the... (/thread-141121.html)



change what's in the... - MYBB GHOST - 2013-06-16

How do you change what's in the {1} {2} etc?


RE: change what's in the... - Nathan Malcolm - 2013-06-16

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.


RE: change what's in the... - MYBB GHOST - 2013-06-16

(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?


RE: change what's in the... - Krytic - 2013-06-17

(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).