MyBB Community Forums

Full Version: Display Page/Debug with Server Time to All
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone teach me how to do this? I still don't get how to do it Sad

[Image: falTyqP.png]
The first question is why would you want/need to?
(02-05-2016, 08:50 AM)Tom K. Wrote: [ -> ]The first question is why would you want/need to?

I often find that my users are interested in mundane or miscellaneous statistics.

Anyway OP, download and install Yumi's PHP in Templates and Template Conditionals plugin.

Find your theme's footer template and find the area where you want to display the server time.

<?
$time = date('m/d/Y h:i:s a', time());
echo "The current server time is: " . $time;
?>

Paste that into the <div></div> or wherever you need it.

That should work.
(02-05-2016, 08:58 AM)Marisa Wrote: [ -> ]
(02-05-2016, 08:50 AM)Tom K. Wrote: [ -> ]The first question is why would you want/need to?

I often find that my users are interested in mundane or miscellaneous statistics.

Anyway OP, download and install Yumi's PHP in Templates and Template Conditionals plugin.

Find your theme's footer template and find the area where you want to display the server time.

<?
$time = date('m/d/Y h:i:s a', time());
echo "The current server time is: " . $time;
?>

Paste that into the <div></div> or wherever you need it.

That should work.

I think this is the one! I hope this works (y) I'll try it Smile

Is there any way to display the debug? Hmmm

(02-05-2016, 08:50 AM)Tom K. Wrote: [ -> ]The first question is why would you want/need to?

So I can know how does the server loads without logging in. Only the seconds/milliseconds I need and the server time too.
Rather than doing what Marisa said, remove/comment out this conditional: https://github.com/mybb/mybb/blob/featur...ns.php#L25
if($mybb->usergroup['cancp'] == 1 || $mybb->dev_mode == 1)

Leave this part inside the conditional if the page itself shouldn't be affected: https://github.com/mybb/mybb/blob/featur...hp#L81-L84
if($mybb->debug_mode == true)
{
	debug_page();
}
(02-05-2016, 11:08 PM)Destroy666 Wrote: [ -> ]Rather than doing what Marisa said, remove/comment out this conditional: https://github.com/mybb/mybb/blob/featur...ns.php#L25
if($mybb->usergroup['cancp'] == 1 || $mybb->dev_mode == 1)

Leave this part inside the conditional if the page itself shouldn't be affected: https://github.com/mybb/mybb/blob/featur...hp#L81-L84
if($mybb->debug_mode == true)
{
	debug_page();
}

I tried it and it worked Big Grin but is there another way that only the generated seconds will be displayed including the server time?