Implementation Method of destoon Calling Post with Picture in discuz Forum

  • 2021-07-16 01:57:25
  • OfStack

In destoon development, sometimes we need to call forum posts, but how to call posts with pictures? This article will show an example to call discuz forum posts with pictures:

The label code is as follows:


<!--{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]}" width="50" height="50" /></A>
{/loop}

The method of calling new posts in the forum is as follows:


<!--{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}

I hope the method described in this paper is helpful to the development of destoon.


Related articles: