[3.3][CDB] Enable Debug & Display Load Time - phpBB Extension

Extensions for phpBB 3.3.X
Maintained and supported by Stoker

[3.3][CDB] Enable Debug & Display Load Time - phpBB Extension

Post by Stoker »

Extension Name: Enable Debug & Display Load Time
Author: Stoker
Extension Version: Image
Requirements: Image

Extension Description:
Enable Debug & Display Load Time without editing core files.
More explanation here: viewtopic.php?t=2714


Screenshots:
debug.png


Extension Download:
Download CDB validated file from phpbb.com
Extension overview page

Older versions

stoker_debug-1.0.0-dev.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Stoker on 28 May 2025, 02:54, edited 3 times in total.
Reason: - Extension validated CDB

Re: [EXT] Enable Debug & Display Load Time

Post by pxdetroit »

oooooh this one looks promising!

Enable Debug & Display Load Time - phpBB Extension

Post by flumsi »

Hello everyone

As an admin, I really appreciate the footer display. Works perfectly ;)
Thanks for this extension :beer:

We speak German, so I've been looking for a way to translate the English text into German and haven't found anything.
The extension doesn't have its own voice output, and our forum is in German. I can't find a way to change the English text.

Time: 0.359s | Peak Memory Usage: 12.07 MiB
Ladezeit: 0.359s | Max. Speicherauslastung: 12.07 MiB |

My glasses are cleaned, but my vision seems blurred :oops:

Enable Debug & Display Load Time - phpBB Extension

Post by Stoker »

Unfortunately the language is hardcoded in includes/functions.php
You will find it around line 4232

Code: Select all

// Output page creation time
	if ($phpbb_container->getParameter('debug.load_time'))
	{
		if (isset($GLOBALS['starttime']))
		{
			$totaltime = microtime(true) - $GLOBALS['starttime'];
			$debug_info[] = sprintf('<span title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</span>', $db->get_sql_time(), ($totaltime - $db->get_sql_time()), $totaltime);
		}
	}

	if ($phpbb_container->getParameter('debug.memory'))
	{
		$memory_usage = memory_get_peak_usage();
		if ($memory_usage)
		{
			$memory_usage = get_formatted_filesize($memory_usage);

			$debug_info[] = 'Peak Memory Usage: ' . $memory_usage;
		}

		$debug_info[] = 'GZIP: ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off');

		if ($user->load)
		{
			$debug_info[] = 'Load: ' . $user->load;
		}
	}

	if ($phpbb_container->getParameter('debug.sql_explain'))
	{
		$debug_info[] = sprintf('<span title="Cached: %d">Queries: %d</span>', $db->sql_num_queries(true), $db->sql_num_queries());

		if ($auth->acl_get('a_'))
		{
			$debug_info[] = '<a href="' . build_url() . '&amp;explain=1">SQL Explain</a>';
		}
	}

Enable Debug & Display Load Time - phpBB Extension

Post by flumsi »

Why do they do that? :? :headbang:

Of course I can't find anything, I would never have thought of that :evil:
Anyway, I learned something new :thumb:
I was able to paraphrase everything into German :pc:

Thank you for your help

:drinking: