把这个代码共享出来吧,希望能帮助到有需要的人。
调用最新发布的10篇文章:
{foreach GetList(10) as $newlist}
{$newlist.Time('m-d')}{$newlist.Title} {/foreach}
调用点击最多的10篇文章:
{php}
$order = array('log_ViewNums'=>'DESC');
$where = array(array('=','log_Status','0'));
$array = $zbp->GetArticleList(array('*'),$where,$order,array(10),'');
{/php}
{foreach $array as $hotlist}
{$hotlist.ViewNums}℃{$hotlist.Title} {/foreach}
调用评论最多的10篇文章:
{php}
$order = array('log_CommNums'=>'DESC');
$where = array(array('=','log_Status','0'));
$array = $zbp->GetArticleList(array('*'),$where,$order,array(10),'');
{/php}
{foreach $array as $hotlist}
{$hotlist.CommNums}评论 {$hotlist.Title} {/foreach}
ps:代码不是很好,不过能用...
!
发表评论