加入收藏 | 设为首页 | 会员中心 | 我要投稿 济南站长网 (https://www.0531zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

DISCUZ X 主题列表页调用 贴子内容的技巧

发布时间:2021-11-27 19:02:16 所属栏目:教程 来源:互联网
导读:forumdisplay_list.htm文件查找: a href=forum.php?mod=viewthreadtid=$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}

forumdisplay_list.htm文件查找:
<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>
复制代码
后面加上
<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为内容摘要的字数,可以自行控制。完成后更新缓存即可。

(编辑:济南站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读