无限星辰工作室-客户无限互联网动力之源

标题: Discuz!x3.2搜索分类信息的字段的实现方案之一 [打印本页]

作者: crx349    时间: 2014-11-19 14:54
标题: Discuz!x3.2搜索分类信息的字段的实现方案之一

修改文件:search_forum.php
修改方法:
step1:   将
  1. $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:    将
  1. 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);
复制代码






欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4