,1、搜索框代码里使用name="q"作为搜索框属性,例如,,(此图片来源于网络,如有侵权,请联系删除! ),2、打开 /include/taglib/arclist.lib.php 找到,大概在188行,$innertext = trim($innertext);,在它下面加入,preg_match("/~([A-Za-z0-9_]+)~/s", $keyword, $conditions);
if(isset($_REQUEST['q']) && $keyword = '~q~')
{
preg_match("/~([A-Za-z0-9_]+)~/s", $keyword, $conditions);
$keyword = addslashes(trim($_REQUEST['q']));
},继续找到,$taghash = md5(serialize($ctag).$typeid);,改成,$taghash = md5(serialize($ctag).$typeid.$keyword);,3、搜索结果模板 search.htm 里调用标签写法