Вывод топиков на главную
Сейчас по умолчанию выводятся топики «Интересные», как вывести на главную топики из «Новые»?
{if {date_format date=$oStreamEvent->getDateAdded() format="j F Y"} != $sDateLast} {assign var=sDateLast value={date_format date=$oStreamEvent->getDateAdded() format="j F Y"}} <li class="stream-header-date"> {if {date_format date=$smarty.now format="j F Y"} == $sDateLast} {$aLang.today} {else} {date_format date=$oStreamEvent->getDateAdded() format="j F Y"} {/if} </li> {/if}
{if {date_format date=$oTopic->getDateAdded() format="j F Y"} != $sDateLast} {assign var=sDateLast value={date_format date=$oTopic->getDateAdded() format="j F Y"}} <li class="stream-header-date"> {if {date_format date=$smarty.now format="j F Y"} == $sDateLast} {$aLang.today} {else} {date_format date=$oTopic->getDateAdded() format="j F Y"} {/if} </li> {/if}
{if {date_format date=$oTopic->getDateAdded() format="j F Y"} != $sDateLast} {assign var=sDateLast value={date_format date=$oTopic->getDateAdd() format="j F Y"}} <li class="stream-header-date"> {if {date_format date=$smarty.now format="j F Y"} == $sDateLast} {$aLang.today} {else} {date_format date=$oTopic->getDateAdd() format="j F Y"} {/if} </li> {/if}
public function GetTopicsGood($iPage,$iPerPage,$bAddAccessible=true) { $aFilter=array( 'blog_type' => array( 'personal', 'open', 'Ваш_Тип' ),
public function GetTopicsNew($iPage,$iPerPage,$bAddAccessible=true)
public function GetTopicsNewAll($iPage,$iPerPage,$bAddAccessible=true)
public function GetTopicsDiscussed($iPage,$iPerPage,$sPeriod=null,$bAddAccessible=true)
public function GetTopicsTop($iPage,$iPerPage,$sPeriod=null,$bAddAccessible=true)
public function GetTopicsLast($iCount)
public function GetTopicsPersonalByUser($sUserId,$iPublish,$iPage,$iPerPage)
public function GetCountTopicsPersonalByUser($sUserId,$iPublish)
<?php class PluginActors_BlockBlogactors extends Block { public function Exec() { $sBlogUrl = Router::GetActionEvent(); if (($sBlogUrl != 'actors') && ($oBlog = $this->Blog_GetBlogByUrl($sBlogUrl))) { $aResult = $this->PluginActors_Main_GetActorTopicsByBlogId($oBlog->getId(), $iPage, Config::Get('module.actorsblock.per_page')); if ($aResult['count']) { $oViewer = $this->Viewer_GetLocalViewer(); $oViewer->Assign('topics', $aResult['collection'], true); $sTextResult = $oViewer->Fetch("component@activity.recent-actors"); $this->Viewer_Assign('content', $sTextResult, true); } } $this->SetTemplate(Plugin::GetTemplatePath(__CLASS__) . '/blocks/block.blogactors.tpl'); } }
<?php class PluginVideos_BlockBlogvideos extends Block { public function Exec() { $sBlogUrl = Router::GetActionEvent(); if (($sBlogUrl != 'videos') && ($oBlog = $this->Blog_GetBlogByUrl($sBlogUrl))) { if ($sBlogUrl != 'actors') { $aResult = $this->PluginVideos_Main_GetVideoTopicsByBlogId($oBlog->getId(), $iPage, '2'); }else{ $aResult = $this->PluginVideos_Main_GetVideoTopicsByBlogId($oBlog->getId(), $iPage, '3'); } if ($aResult['count']) { $oViewer = $this->Viewer_GetLocalViewer(); $oViewer->Assign('topics', $aResult['collection'], true); $sTextResult = $oViewer->Fetch("component@activity.recent-videos"); $this->Viewer_Assign('content', $sTextResult, true); } } $this->SetTemplate(Plugin::GetTemplatePath(__CLASS__) . '/blocks/block.blogvideos.tpl'); } }