找回密码
 注册
搜索
热搜: 赚钱

[笔记] discuz帖子列表页显示摘要

[复制链接]
邱双仪 发表于 2023-7-14 04:12:41 | 显示全部楼层 |阅读模式

找到相关位置: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
1
1在下方增加摘要:
1

  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) 为内容摘要的字数,可以自行控制。

完成后更新缓存即可




您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|私人领地 ( 浙ICP备19032069号-2 )

GMT+8, 2023-10-3 02:45 , Processed in 0.013476 second(s), 2 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表