<!--{block name="bbsthread" parameter="sql/SELECT t.*,a.* FROM cdb_threads t INNER JOIN cdb_attachments a ON t.tid=a.tid WHERE t.fid in (20,29,31) and t.attachment=2 and a.isimage=1 group by t.tid ORDER BY t.dateline DESC/limit/0,4/cachetime/900/subjectlen/15/cachename/images/tpl/data"}-->
<!--{loop $_SBLOCK['images'] $value}-->
<li><span style=" display:inline; padding:3px; border:1px solid #CCCCCC"><a href="$value[url]"><img src="{B_URL}/attachments/$value[attachment]" style="width:120px;height:80px;" alt="" /></span></a><br /><a href="$value[url]" target="_blank">$value[subject]</a></li>
<!--{/loop}-->