找回密码
 免费注册

Discuz!搜索分类信息的字段的实现

[复制链接]
发表于 2023-1-25 20:57:24 | 显示全部楼层 |阅读模式
Discuz!搜索分类信息的字段的实现


修改文件:search_forum.php
修改方法:
step1:   将 $sqlsrch = $srchtype == 'fulltext' ? 行后修改成

  1. "FROM pre_forum_typeoptionvar o, ".DB::table(getposttable($seltableid))." p, ".DB::table('forum_thread')." t WHERE $digestltd t.fid IN ($fids) $topltd AND p.tid=t.tid AND p.invisible='0' AND o.tid=t.tid" :
  2.     "FROM pre_forum_typeoptionvar o, ".DB::table('forum_thread')." t WHERE $digestltd t.fid IN ($fids) $topltd AND o.tid=t.tid";
复制代码
step2:    将 if($srchtxt) { 的下一行修改成

  1. $srcharr = $srchtype == 'fulltext' ? searchkey($keyword, "(p.message LIKE '%{text}%' OR p.subject LIKE '%{text}%' OR o.value LIKE '%{text}%')", true) : searchkey($keyword,"t.subject LIKE '%{text}%' OR o.value LIKE '%{text}%'", true);
复制代码

QQ|Archiver|小黑屋|网站地图|深圳市金黑网络技术有限公司 ( 粤ICP备2021124338号|粤公网安备 44030702003689号 )

GMT+8, 2026-8-8 16:06 , Processed in 0.053590 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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