登入后臺----------核心------------頻道模型--------內容模型管理---
----普通文章---
---【點擊后面那個放大鏡標志】(最重要一步)----------
附件表可供自定義搜索的字段:
這里的字段是程序依據字段類型自動選擇生成的。
文章內容
將“文章內容”前面那個打勾
此時將修改掉搜索字段
但是還沒有成功,還需要修改模板相應的代碼:
修改模板文件中的: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>
此時更新網站,將會發現搜索數據已經有了質的飛躍。