DedeCMS调用Discuz7.2带图片附件主题的方法

今日有一朋友在做啦询问如何在DedeCMS调用Discuz7.2带图片附件主题,现在就把调用方法分享给大家,注意代码中的bbs.zuola.net为烈火论坛的网址,请修改为自己的论坛地址,将以下代码插入到自己的DEDE模板中就可以了。
 
Copy to zuola.net Codes引用的内容:[www.zuola.net]
{dede:sql sql="SELECT cdb_attachments.aid, cdb_attachments.attachment,cdb_threads.tid, cdb_threads.subject FROM cdb_attachments LEFT JOIN cdb_threads ON cdb_threads.tid = cdb_attachments.tid WHERE cdb_attachments.readperm='0' AND cdb_threads.displayorder>='0' AND (right(cdb_attachments.filename,3)='jpg' or right(cdb_attachments.filename,3)='gif') GROUP BY tid LIMIT 0,4"} 
 
<li><a href="http://bbs.zuola.net/viewthread.php?tid=[field:tid /]"><img src="http://bbs.zuola.net/attachments/[field:attachment/]" alt="[field:subject/]"></a></li> 
 
{/dede:sql}