调用某版块最新帖子:(红色部分分别为:“DZ数据库名、版块ID、调用条数、帖子ID、标题字数”):
[e:ref="https://xwenw.com/tag/loop" target="_blank">loop={"select tid,subject,dateline from 数据库名.表前缀_threads where fid=版块ID order by tid desc limit 10",10,24,0}]<li><a href="/bbs/thread-<?=$bqr[tid]?>-1-1.html" target="_blank"><?=esub($bqr[subject],32)?></a></li>[/e:loop]
调用全论坛新帖子:
[e:loop={"select tid,subject,dateline from jinyu5.cdb_threads order by tid desc limit 8",10,24,0}]<li><a href="/bbs/thread-<?=$bqr[tid]?>-1-1.html" target="_blank"><?=esub($bqr[subject],32)?></a></li> [/e:loop]
调用全论坛热帖子:
[e:loop={"select tid,subject,dateline from jinyu5.cdb_threads order by views desc limit 8",10,24,0}]<li><a href="/bbs/thread-<?=$bqr[tid]?>-1-1.html" target="_blank"><?=esub($bqr[subject],32)?></a></li> [/e:loop]
调用指定版块的精华帖子:
[e:loop={"select tid,subject,dateline,digest from accbbs.accbbsforum_thread where digest!=0 and fid=版块ID order by tid desc limit 10",10,24,0}]
<li><a href="http://www.caikaoyuan.com/thread-<?=$bqr[tid]?>-1-1.html" title="<?=$bqr[subject]?>" target="_blank"><?=esub($bqr[subject],30)?></a></li>
[/e:loop]
调用指定版块热门帖,如调用版块ID为40的回复数超过20的帖:
[e:loop={"select tid,subject,dateline,replies from accbbs.accbbsforum_thread where replies>=20 and fid=40 order by tid desc limit 10",10,24,0}]
<li><a href="http://www.caikaoyuan.com/thread-<?=$bqr[tid]?>-1-1.html" title="<?=$bqr[subject]?>" target="_blank"><?=esub($bqr[subject],30)?></a></li>
[/e:loop]
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)