也不知道公司网站上的评论排行列表怎么写的,无奈不想做大的改动.先不谈调用数据,就说这个HTML和CSS还有调用数据的方式,,,不禁汗颜,有兴趣的可以研究下,先把这个原始的放出来大家看一下.
<ul class="hifi_List2">
{php $i=0}
{pc:comment action="bang" siteid="$siteid" num="1000"}
{loop $data $b}
{php $str=ltrim($b['commentid'],'content_'); $end=stripos($str,"-"); $cid=substr($str,0,$end);}
{if $cid==$catid}
{php $i++;}
{if $i<=1}
<li class="f">
{php $str=rtrim($b['commentid'],'-1'); $start=stripos($str,"-")+1; $aid=substr($str,$start)}
{php $db = pc_base::load_model('content_model'); $t = $db->get_one(array('id'=>$aid))}
<div class="tit"><a href="{$b['url']}">{$b['title']}</a></div>
<div class="fImg"><a href="{$b['url']}"><img src="{thumb($t['thumb'],80,55)}" alt="{$b['title']}" width="80" height="55" /></a></div>
<div class="fCon">{str_cut($t['description'],112)}[<a href="{$b['url']}">查看全文</a>]<br/><span class="fr hits">{$b['total']}</span></div>
</li>
{else}
<?php if($i>15)break;?>
<li class="li"><a href="{$b['url']}">{str_cut($b['title'],56)}</a><span class="hits">{$b['total']}</span></li>
{/if}
{/if}
{/loop}
{/pc}
<div class="bk"></div>
</ul>