Example #1
0
 /**
  * Выводим HTML
  *
  */
 public function InsertBlogosphereTpl()
 {
     $aConfig = PluginBlogosphere::getTimePeriod();
     for ($iCurTime = $aConfig['timeStart']; $iCurTime < $aConfig['timeEnd']; $iCurTime += Config::Get('plugin.blogosphere.interval')) {
         $aConfig['aTimeStamp'][] = $iCurTime;
     }
     $this->Viewer_Assign('aBlogosphere', $aConfig);
     return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'Blogosphere.tpl');
 }
Example #2
0
 /**
  * Выводит список топиков
  *
  */
 protected function ajaxGetTopics()
 {
     $this->Viewer_SetResponseAjax('json');
     $aDates = PluginBlogosphere::getTimePeriod();
     //загоняем данные в фильтр
     $aFilter = array('filterType' => getRequest('filterType'), 'more' => array('topic_date_add' => strftime('%Y-%m-%d %H:%M:00', $aDates['timeStart'])), 'less' => array('topic_date_add' => strftime('%Y-%m-%d %H:%M:00', $aDates['timeEnd'])), 'in' => array());
     //Получаем список топиков
     $aResult = $this->Topic_GetTopicsForBlogosphereByFilter($aFilter);
     $this->Viewer_AssignAjax('topics', $aResult ? $this->prepareData($aResult) : '');
 }