在线搜索模块插件调用

在线搜索前台调用

1)普通搜索:
<form action="{$WANHUI['site_url']}search/index.php" method="get" name="myform">
     <input type="hidden" name="modelid" id="modelid" value="all" />
     <input name="k" value="{stripslashes($k)}" class="kk"/>
     <input type="submit" class="button" value="" />
</form>   
代码解析:
{$WANHUI['site_url']}search/index.php//在线搜索数据处理页面,通过GET方式提交。
modelid参数,指搜索内容的模型ID,在后台配置。
k参数表示搜索关键词

2)自定义搜索
后台模型管理,点击搜索表单,选择搜索的字段,生成模板搜索表单。如下:
<form name="searchform9" action="/search/index.php" method="get">
<input type="hidden" name="modelid" value="1" />
文章标题:<input type="text" name="title" size="20" /> <br />
内容简介:<input type="text" name="description" size="20" /> <br />
责任编辑:<input type="text" name="editor" size="20" /> <br />
稿件来源:<input type="text" name="copyfrom" size="20" /> <br />
<input type="submit" value="搜索" name="searchsubmit" />
</form>