2009-05-10 10:50:39 +03:00
|
|
|
|
<?php
|
2014-10-08 08:20:29 +03:00
|
|
|
|
/*
|
|
|
|
|
* LiveStreet CMS
|
|
|
|
|
* Copyright © 2013 OOO "ЛС-СОФТ"
|
|
|
|
|
*
|
|
|
|
|
* ------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* Official site: www.livestreetcms.com
|
|
|
|
|
* Contact e-mail: office@livestreetcms.com
|
|
|
|
|
*
|
|
|
|
|
* GNU General Public License, version 2:
|
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
|
*
|
|
|
|
|
* ------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* @link http://www.livestreetcms.com
|
|
|
|
|
* @copyright 2013 OOO "ЛС-СОФТ"
|
|
|
|
|
* @author Maxim Mzhelskiy <rus.engine@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
*/
|
2008-09-21 09:36:57 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Обработка блока с рейтингом блогов
|
|
|
|
|
*
|
2014-10-08 08:20:29 +03:00
|
|
|
|
* @package application.blocks
|
2012-05-04 13:45:34 +03:00
|
|
|
|
* @since 1.0
|
2008-09-21 09:36:57 +03:00
|
|
|
|
*/
|
2014-10-08 11:49:34 +03:00
|
|
|
|
class BlockBlogs extends Block
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Запуск обработки
|
|
|
|
|
*/
|
|
|
|
|
public function Exec()
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Получаем список блогов
|
|
|
|
|
*/
|
|
|
|
|
if ($aResult = $this->Blog_GetBlogsRating(1, Config::Get('block.blogs.row'))) {
|
|
|
|
|
$aBlogs = $aResult['collection'];
|
|
|
|
|
$oViewer = $this->Viewer_GetLocalViewer();
|
|
|
|
|
$oViewer->Assign('aBlogs', $aBlogs);
|
|
|
|
|
/**
|
|
|
|
|
* Формируем результат в виде шаблона и возвращаем
|
|
|
|
|
*/
|
2014-10-29 11:50:07 +02:00
|
|
|
|
$sTextResult = $oViewer->Fetch("components/blog/blocks/blogs-top.tpl");
|
2014-10-08 11:49:34 +03:00
|
|
|
|
$this->Viewer_Assign('sBlogsTop', $sTextResult);
|
|
|
|
|
}
|
2014-10-29 11:50:07 +02:00
|
|
|
|
|
|
|
|
|
$this->SetTemplate('components/blog/blocks/block.blogs.tpl');
|
2014-10-08 11:49:34 +03:00
|
|
|
|
}
|
2014-05-28 08:37:30 +03:00
|
|
|
|
}
|