DISCUZ X 主题列表页调用 贴子内容的方法 [复制链接]

moqu8 2018-4-11

6 0
forumdisplay_list.htm文件查找:
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_G['gp_archiveid']}archiveid={$_G['gp_archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else}{/if} class="xst" >$thread[subject]</a>
复制代码
后面加上 
  1. <p><!--{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'),120);}--></p>
复制代码
其中120为内容摘要的字数,可以自行控制。完成后更新缓存即可。
最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心