返回列表 发帖
查看: 2044|回复: 3

[已解决] Discuz! X3.4如何设置编辑主题后自动提升?

48

主题

177

回帖

236

积分

炉火纯青

贡献
0 点
金币
0 个
发表于 2022-7-12 11:09:44 | 查看全部 |阅读模式
Discuz! X3.4如何设置编辑主题后自动提升?
1 贡献

最佳答案

帖子内容编辑后自动提升主题
修改文件:
source\include\post\post_editpost.php
修改方法:
搜索
$modpost->editpost($param);
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被访问后自动提升主题
修改文件:
\source\module\forum\forum_viewthread.php
修改方法:
搜索
viewthread_updateviews($archiveid);
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被支持/反对(顶/踩)后自动提升主题
修改文件:
\source\module\forum\forum_misc.php
修改方法:
搜索
if($_G['setting']['recommendthread']['daycount'])
在上方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被评分后自动提升主题
修改文件:
\source\module\forum\forum_misc.php
修改方法:
搜索
showmessage('thread_rate_succeed', dreferer());
在上方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_GET['tid']));
帖子被收藏后自动提升主题
修改文件:
\source\include\spacecp\spacecp_favorite.php
修改方法:
搜索
C::t('forum_thread')->increase($id, array('favtimes'=>1));
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$id));

网上搜到的,但我需要的是主题被购买后提升主题,搜索无果,哎~
回复

使用道具 举报

56

主题

1470

回帖

3万

积分

管理员

贡献
2074 点
金币
1389 个
发表于 2022-7-12 23:21:36 | 查看全部
回复

使用道具 举报

12

主题

1655

回帖

2791

积分

Giter

贡献
147 点
金币
359 个
发表于 2022-7-13 03:58:23 | 查看全部
看来未来可以考虑加一个按编辑时间排序的功能
回复

使用道具 举报

13

主题

65

回帖

107

积分

渐入佳境

贡献
3 点
金币
5 个
发表于 2024-3-18 00:51:31 | 查看全部
帖子内容编辑后自动提升主题
修改文件:
source\include\post\post_editpost.php
修改方法:
搜索
$modpost->editpost($param);
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被访问后自动提升主题
修改文件:
\source\module\forum\forum_viewthread.php
修改方法:
搜索
viewthread_updateviews($archiveid);
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被支持/反对(顶/踩)后自动提升主题
修改文件:
\source\module\forum\forum_misc.php
修改方法:
搜索
if($_G['setting']['recommendthread']['daycount'])
在上方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_G['tid']));
帖子被评分后自动提升主题
修改文件:
\source\module\forum\forum_misc.php
修改方法:
搜索
showmessage('thread_rate_succeed', dreferer());
在上方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$_GET['tid']));
帖子被收藏后自动提升主题
修改文件:
\source\include\spacecp\spacecp_favorite.php
修改方法:
搜索
C::t('forum_thread')->increase($id, array('favtimes'=>1));
在下方加入一行
DB::update('forum_thread',array('lastpost'=>TIMESTAMP),array('tid'=>$id));

网上搜到的,但我需要的是主题被购买后提升主题,搜索无果,哎~
回复

使用道具 举报

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

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2025-5-6 23:15 , Processed in 0.073441 second(s), 25 queries .

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表