discuz论坛程序调用主题帖子内容摘要代码方法教程有两个,都比较简单,推荐使用第一个方法。第一个方法dz代码:
- <!--{eval require_once(DISCUZ_ROOT."./source/function/function_post.php");}-->
- <!--{echo messagecutstr(DB::result_first('SELECT `message` FROM '.DB::table('forum_post').' WHERE `tid` ='.$thread[tid].' AND `first` =1'),200);}-->
复制代码
第二个方法dz代码:
- <!--{eval $threadlist_message = DB::result(DB::query("SELECT message FROM ".DB::table('forum_post')." WHERE `tid` = $thread[tid] AND `first` =1"));}-->
- <!--{echo cutstr($threadlist_message,300)}-->
复制代码 自丢网推荐大家使用第一种方法即可。
|
|