Well I realised that many of us don't want to let users see to many technical details. So in v1.6, the PHP version, Debug mode and GZIP compresion status will be visible only to admins.
A neat feature that i added was the Detailed View. Basically, it's a link that will output in details, what is happening on that page, related to PHP and MySQL. I will post a screenshoot below, so you can understand better.
1. forum/admin/functions.php
In [high]function dooutput()[/high], replace the previous edited code with:
PHP Code:
// ###################### Start dooutput #######################
function dooutput($vartext,$sendheader=1) {
global $pagestarttime,$query_count,$showqueries,$querytime,$DB_site,$gzipoutput,$gziplevel,$bbuserinfo,$microstats;
$pageendtime=microtime();
$starttime=explode(" ",$pagestarttime);
$endtime=explode(" ",$pageendtime);
// time format (how many digits you want to show)
$digits=7;
$totaltime=$endtime[0]-$starttime[0];
$trimmedtime=number_format($totaltime,$digits);
$percentphp=number_format(((($totaltime-$querytime)/$totaltime)*100), 2)."% PHP";
$percentsql=number_format((($querytime/$totaltime)*100), 2)."% MySQL";
if ($bbuserinfo['usergroupid']==6) {
if ($gzipoutput==1) {
$gziptext="GZIP library compression enabled (level $gziplevel)";
} else {
$gziptext="GZIP library compression disabled";
}
$debugmode=(DEBUG)?" (Debug mode)":"";
$versionphp=phpversion();
$adminstats="PHP version $versionphp $debugmode with $gziptext. [<a href=\"$PHP_SELF?explain=1\" target=\"_blank\">details</a>]";
} else {
$adminstats="";
}
if ($showqueries) {
$vartext .= "<!-- Page generated in $totaltime seconds with $query_count queries -->";
} else {
eval("\$microstats = \"".gettemplate('home_microstats')."\";");
}
2. home_microstats template
replace your vbMicroStats template contents with:
Code:
Page generated in $trimmedtime seconds ($percentphp - $percentsql) with $query_count queries.<br>
$adminstats
if you used the
$microstats variable, replace the old code with:
PHP Code:
$microstats = "Page generated in $trimmedtime seconds ($percentphp - $percentsql) with $query_count queries.<br>
$adminstats";