找了论坛,有调用discuz 新帖,精华帖,有图贴的,就是没有热帖调用,这里给出一个,顺便记录一下
一周热帖 <? $dateline=time()-7*86400; ?> [e:loop={"select tid,subject,replies,dateline from bbs_forum_thread where dateline > $dateline order by replies desc limit 8",10,24,0}] <li><a href="/thread-<?=$bqr[tid]?>-1-1.html" target="_blank" title="<?=$bqr[subject]?>"> <?=$bqr[subject]?> </a></li> [/e:loop]
我这里是以replies 就是回复数判断的,你也可以根据点击数判断热帖
<? $dateline=time()-7*86400; ?> [e:loop={"select tid,subject,replies,views,dateline from bbs_forum_thread where dateline > $dateline order by views desc limit 8",10,24,0}] <li><a href="/thread-<?=$bqr[tid]?>-1-1.html" target="_blank" title="<?=$bqr[subject]?>"> <?=$bqr[subject]?> </a></li> [/e:loop]
同理半个月,30天也是一样,把7换成 15 30 就行了
|