Сам хак
vBMicroStats с иконками.
Код:
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="microstats" active="1">
<title>vBMicroStats</title>
<description>Этот хак включает просмотр: времяни загрузки страниц, загрузки сервера, колличество запросов, не кешируемые шаблоны</description>
<version>1.2.1</version>
<codes>
</codes>
<templates>
</templates>
<plugins>
<plugin active="1">
<title>Microstats</title>
<hookname>global_complete</hookname>
<phpcode><![CDATA[// Microstats 1.2.1 Plugin
$pageendtime = microtime();
$starttime = explode(' ', $pagestarttime);
$endtime = explode(' ', $pageendtime);
$totaltime = vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], 5);
$debughtml = '<center><span class="smallfont"><img border="0" src="images/img.gif"> <b>' . $totaltime . '</b> сек <img border="0" src="images/img2.gif"><b>' . $vbulletin->db->querycount . '</b> запросов';
if ($vbulletin->userinfo['usergroupid'] == 6) {
$debughtml .= iif($_TEMPLATEQUERIES, ' (<b>' . sizeof($_TEMPLATEQUERIES) . '</b> запрос(а) для некэшируемых шаблонов)', '') . "$serverload";
ksort($tempusagecache);
foreach ($tempusagecache AS $tempname => $times) {
if ($_TEMPLATEQUERIES["$tempname"]){
$debughtml .= '<center><span class="smallfont">Некэшируемые шаблоны: <font color="red"><b>' . $tempname . '</b></font> (' . $times . ')</span></center>';
}
}
}
$debughtml .= "</span></center>";
if (!$vbulletin->config['Microstats']['replacementvariable']) {
$vbulletin->config['Microstats']['replacementvariable'] = '<!-- microstats-->';
}
if (($vbulletin->config['Microstats']['adminonly'] and $vbulletin->userinfo['usergroupid'] == 6) or !$vbulletin->config['Microstats']['adminonly']){
$output = str_replace($vbulletin->config['Microstats']['replacementvariable'], $debughtml . $vbulletin->config['Microstats']['replacementvariable'], $output);
}
// Microstats 1.2.1 Plugin]]></phpcode>
</plugin>
</plugins>
<phrases>
</phrases>
<options>
</options>
</product>
и в любое место вставить:
<!-- microstats-->