调用贴子:
{dede:loop table="cdb_threads" if='digest>0′ sort="tid" row="10″} <LI><A href="/bbs/viewthread.php?tid=[field:tid /]">[field:subject function="cn_substr('@me',30)" /]</A> {/dede:loop}
if="" 条件
示例1:调用版块ID为4的贴子:
if="fid=4″ 调用指定版块的贴子
示例2:调用版块ID为4的精华贴子
if="fid=4 AND digest>0″
示例3:调用回复超过20贴的贴子
if="fid=4 AND replies>20″
调用附件带图片的贴子
{dede:sql sql="SELECT` cdb_attachments`.`aid`, `cdb_attachments`.`attachment`, `cdb_threads`.`tid`, `cdb_threads`.`fid`, `cdb_threads`.`subject` FROM `cdb_attachments` LEFT JOIN `cdb_threads` ON `cdb_threads`.`tid`=`cdb_attachments`.`tid` WHERE `cdb_attachments`.`readperm`='0′ AND `displayorder`>='0′ AND `filetype`=' image/pjpeg' GROUP BY tid LIMIT 0,2″} <li><A href="/bbs/viewthread.php?tid=[field:tid /]"><IMG src=" /bbs/attachments/[field:attachment/]"></A></li> <li><A href="/bbs/viewthread.php?tid=[field:tid /]">[field:subject function= "cn_substr('@me',30)" /]</A></li> {/dede:sql}
更多关于Discuz论坛内容来自木庄网络博客
标签:Discuz论坛
相关阅读 >>
更多相关阅读请进入《Discuz论坛》频道 >>