dedecms全文搜索功能的实现方法
类别:建站知识   时间:05-09

织梦dedecms 5.5 默认的模糊搜索只能根据网站文章的名称进行搜索,无法搜索到文章内部信息,对此经过研究得出以下修改方法,现共享下:登入后台———-核心————频道模型——–内容模型管理——-普通文章——【点击后面那个放大镜标志】(最重要一步)———-附件表可供自定义搜索的字段:这里的字段是程序依据字段类型自动选择生成的。文章内容将“文章内容”前面那个打勾此时将修改掉搜索字段但是还没有成功,还需要修改模板相应的代码:修改模板文件中的:head.htm文件中<form action="{dede:field name=’phpurl’/}/search.php" name="formsearch"><div class="form"><h4>搜索</h4><input type="hidden" name="kwtype" value="0" /><input name="keyword" type="text" class="search-keyword" id="search-keyword" /><select name="searchtype" class="search-option" id="search-option"><option value="titlekeyword" selected=’1′>智能模糊搜索</option><option value="title">仅搜索标题</option></select><button type="submit" class="search-submit">搜索</button></div></form>修改为:<form action="/plus/advancedsearch.php" method="post"><div class="form"><h4>搜索</h4><input type="hidden" name="mid" value="1" /><input type="hidden" name="dopost" value="search" />关键词:<input type="text" name="q" /> <input type="submit" name="submit" value="开始全文搜索" /></div></form>此时更新网站,将会发现搜索数据已经有了质的飞跃~

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890