AddEventPreg('/^(page(\d+))?$/i','EventComments'); } /********************************************************************************** ************************ РЕАЛИЗАЦИЯ ЭКШЕНА *************************************** ********************************************************************************** */ /** * Выводим комментарии * */ protected function EventComments() { /** * Передан ли номер страницы */ $iPage=$this->GetEventMatch(2) ? $this->GetEventMatch(2) : 1; /** * Получаем список комментов */ $iCount=0; $aResult=$this->Comment_GetCommentsAll($iCount,$iPage,BLOG_COMMENT_PER_PAGE); $aComments=$aResult['collection']; /** * Формируем постраничность */ $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,BLOG_COMMENT_PER_PAGE,4,DIR_WEB_ROOT.'/comments'); /** * Загружаем переменные в шаблон */ $this->Viewer_Assign('aPaging',$aPaging); $this->Viewer_Assign("aComments",$aComments); $this->Viewer_AddHtmlTitle($this->Lang_Get('comments_all')); $this->Viewer_SetHtmlRssAlternate(DIR_WEB_ROOT.'/'.ROUTE_PAGE_RSS.'/allcomments/',$this->Lang_Get('comments_all')); /** * Устанавливаем шаблон вывода */ $this->SetTemplateAction('index'); } /** * Выполняется при завершении работы экшена * */ public function EventShutdown() { /** * Загружаем в шаблон необходимые переменные */ $this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect); } } ?>