DISCUZ 主题列表页调用 贴子内容的方法-Discuz教程下载

DISCUZ 主题列表页调用 贴子内容的方法

开通本站Svip会员,全站资源免费下
  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

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部