今日有一朋友在织梦58询问如何在DedeCMS调用Discuz7.2带图片附件主题,现在就把调用方法分享给大家,注意代码中的bbs.liehuo.net为烈火论坛的网址,请修改为自己的论坛地址,将以下代码插入到自己的DEDE模板中就可以了。 Copy to ClipboardLiehuo.Net Codes引用的内容:[www.dede58.com] {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.liehuo.net/viewthread.php?tid=[field:tid /]”><img src=”http://bbs.liehuo.net/attachments/[field:attachment/]” alt=”[field:subject/]”></a></li> {/dede:sql}