找回密码
 立即注册
搜索
jckj 门户 资料 查看内容

DZ全文搜索设置-x3.5

2026-4-6 15:52| 发布者: xmwalo| 查看: 11| 评论: 0

摘要: X3.2 通过 DZ全文搜索设置.txt dzX3.4-utf8全文搜索改后文件.rar x3.4-gbk.zip如果要标题与全文共存 点击查看1.用notepad++或其他文本编辑器打开下述文件网站目录\source\class\table\table_portal_article_content ...
 

如果要标题与全文共存  点击查看

1.用notepad++或其他文本编辑器打开下述文件

网站目录\source\class\table\table_portal_article_content.php
2.在下面的

复制代码
代码如下:

class table_portal_article_content extends discuz_table
{

后添加

复制代码
代码如下:

public function fetch_all_by_sql($where, $order = '', $start = 0, $limit = 0, $count = 0, $alias = '') {
$where = $where && !is_array($where) ? " WHERE $where" : '';
if(is_array($order)) {
$order = '';
}
if($count) {
return DB::result_first('SELECT count(*) FROM '.DB::table($this->_table).' %i %i %i '.DB::limit($start, $limit), array($alias, $where, $order));
}
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).' %i %i %i '.DB::limit($start, $limit), array($alias, $where, $order));
}

变为:

复制代码
代码如下:

class table_portal_article_content extends discuz_table
{
public function fetch_all_by_sql($where, $order = '', $start = 0, $limit = 0, $count = 0, $alias = '') {
$where = $where && !is_array($where) ? " WHERE $where" : '';
if(is_array($order)) {
$order = '';
}
if($count) {
return DB::result_first('SELECT count(*) FROM '.DB::table($this->_table).' %i %i %i '.DB::limit($start, $limit), array($alias, $where, $order));
}
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).' %i %i %i '.DB::limit($start, $limit), array($alias, $where, $order));
}

上面添加那个方法才能用$query = C::t(‘portal_article_content’)->fetch_all_by_sql。

3.打开

网站目录\source\module\search\search_portal.php


路过

雷人

握手

鲜花

鸡蛋
上一篇:cs下一篇:cs1017

最新评论

相关分类

移动删除

Archiver|手机版|小黑屋|JCKJ

GMT+8, 2026-6-5 00:37 , Processed in 0.037638 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

返回顶部