zblogphp调用最新文章 最热文章 最多评论的方法

调用最新发布的10篇文章: {foreach GetList(10) as $newlist} <li><span>{$newlist.Time('m-d')}</span><a href="/go/?url={$newlist.Url}" class="target" rel=...

调用最新发布的10篇文章:

{foreach GetList(10) as $newlist}
<li><span>{$newlist.Time('m-d')}</span><a href="/go/?url={$newlist.Url}" class="target" rel="external nofollow" title="{$newlist.Title}">{$newlist.Title}</a></li>
{/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}
<li><span>{$hotlist.ViewNums}℃</span><a href="/go/?url={$hotlist.Url}" class="target" rel="external nofollow" title="{$hotlist.Title}">{$hotlist.Title}</a></li>
{/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}
<li><span>{$hotlist.CommNums}评论</span> <a href="/go/?url={$hotlist.Url}" class="target" rel="external nofollow" title="{$hotlist.Title}">{$hotlist.Title}</a></li>
{/foreach}


  • 发表于 2021-05-01 09:17
  • 阅读 ( 235 )
  • 分类:互联网

0 条评论

请先 登录 后评论
张德帅
张德帅

729 篇文章

你可能感兴趣的文章

相关问题