Пишу полностью что и как.
Открываем файл /classes/hooks/HookStatisticsPerformance.class.php
После
class HookStatisticsPerformance extends Hook {
public function RegisterHook() {
$this->AddHook('template_body_end','Statistics',__CLASS__,-1000);
Добавляем
$this->AddHook('topic_show','TopicShow');
Далее, после
public function Statistics() {
$oEngine=Engine::getInstance();
$iTimeInit=$oEngine->GetTimeInit();
$iTimeFull=round(microtime(true)-$iTimeInit,3);
$this->Viewer_Assign('iTimeFullPerformance',$iTimeFull);
$aStats=$oEngine->getStats();
$aStats['cache']['time']=round($aStats['cache']['time'],5);
$this->Viewer_Assign('aStatsPerformance',$aStats);
$this->Viewer_Assign('bIsShowStatsPerformance',Router::GetIsShowStats());
return $this->Viewer_Fetch('statistics_performance.tpl');
}
Добавляем
public function TopicShow($aParams) {
$oTopic=$aParams['oTopic'];
$oTopic->setCountRead($oTopic->getCountRead()+1);
$this->Topic_UpdateTopic($oTopic);
}
В шаблоне добавляем в topic.tpl или в topic_list.tpl
Открываем файл /classes/hooks/HookStatisticsPerformance.class.php
После
Добавляем
Далее, после
Добавляем
В шаблоне добавляем в topic.tpl или в topic_list.tpl
Router.class.php
ActionProfile.class.php