在destoon开发中有时候我们需要调用论坛的帖子,但是带有图片的帖子该怎么调用出来呢,本文就来实例展示一个可以调用discuz论坛带图片的帖子的方法:
标签代码如下:
<!--{php $tags=tag("table=pre_forum_thread i,pre_forum_threadimage t&prefix=&condition=i.tid=t.tid&length=36&order=i.tid desc&pagesize=9&target=_blank&template=null");}--> {loop $tags $t} <A href="bbs/forum.php?mod=viewthread&tid={$t[tid]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" target=_blank>{$t[subject]}</A> <br /> <A href="bbs/forum.php?mod=viewthread&tid={$t[tid]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" target=_blank><img src="bbs/data/attachment/forum/{$t[attachment]}" style="max-width:90%" style="max-width:90%" / alt="destoon调用discuz论坛中带图片帖子的实现方法_php实例" ></A> {/loop}
调用论坛新帖子的方法如下:
<!--{php $tags=tag("table=pre_forum_thread&prefix=&length=36&order=tid desc&pagesize=9&target=_blank&template=null");}--> {loop $tags $t} <A href="bbs/forum.php?mod=viewthread&tid={$t[tid]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" target=_blank>{$t[subject]}</A> {/loop}
希望本文所述方法对大家destoon开发有所帮助。