闲来无事,弄了个标签.利用ECMS的万能标签调用DZ论坛的附件图片 先看一下标签:
最新图片调用:
[ecmsinfo]'select u.attachment as titlepic,ui.subject as title,u.tid as id from club.cdb_attachments u LEFT JOIN club.cdb_threads ui ON u.tid=ui.tid where u.isimage=1 order by ui.tid DESC limit 5',0,30,0,24,9,0[/ecmsinfo]
|
热门图片调用:
[ecmsinfo]'select u.attachment as titlepic,ui.subject as title,u.tid as id from club.cdb_attachments u LEFT JOIN club.cdb_threads ui ON u.tid=ui.tid where u.isimage=1 order by ui.views DESC limit 5',0,30,0,24,9,0[/ecmsinfo]
|
标签模板: 页面模板内容:
<table width=100% border=0 cellpadding=3 cellspacing=0> <tr> [!--empirenews.listtemp--] <td align=center><!--list.var1--></td> [!--empirenews.listtemp--] </tr> </table>
|
列表内容模板:
<a href='[!--news.url--]bbs/viewthread.php?tid=[!--id--]' target=_blank><img src='[!--news.url--]bbs/attachments/[!--titlepic--]' width='160' height='120' border=0 alt='[!--title--]'><br><span style='line-height=15pt'>[!--title--]</span></a>
|
其实很简单的,知道论坛的图片放在那个表,存放规律就OK了.调用方式跟DZ论坛的相同,只不过我加多了一个附件表的抓取.只要认识看的人,就可以发现,DZ论坛的附件表isimage 字段值只是要图片的,就是 "1" 那只调用值为"1"的就行了..
效果图:
AD一下:我的小站:http://www.qiqig.com 感谢:http://www.56sa.com 提供带宽服务器
|