Discuz可外部调用搜索的代码

着手升级Discuz! X2.5,发现之前使用的一些个代码,由于网站也改版了,现弃用了,但还是记录一下!比如今天这个,Discuz可外部调用搜索的代码,简单实用!

可能有不少的冗余代码,自用自处理吧!这里就不在精简了!

<style>
/* search */
.yang_search_forum { margin: 10px; width: 900px; height: 72px }
.bbssou1 { padding: 10px 30px 0px 0px; color: #fff; height: 18px; text-align: left; }
.bbssou1 a { color: #555 }
.bbssou1 a:hover { color: #f60 }
.bbssou2 { padding: 5px 0px 0px 0px; color: #fff; height: 30px; text-align: left; }
.bbssou2 .inputa { border: #609acb 1px solid; width: 180px; line-height: 21px; height: 19px }
.bbssou2 .submit { background: url(allbg2.gif) no-repeat -161px -46px; width: 61px; cursor: pointer; border-style: none; height: 24px; }

.inborder { font-size: 12px; background: #fff; width: 86px }
.inborder input { display: none }
.inborder dl { z-index: 9999; color: #000; position: relative }
.inborder dt { border: #609acb 1px solid; cursor: pointer; }
.inborder dt.dt2 { }
.inborder dd { border: #609acb 1px solid; display: none; background: #fff; overflow-x: hidden;overflow-y: auto; width: 84px; cursor:pointer; position:absolute; height:198px }
.inborder dd.show { display: block }
.inborder ul { overflow: hidden; width: 100% }
.inborder li { display: block; border-bottom: #ddd 1px solid; font-style: normal }
.inborder li a { display: block }
.inborder li.show { background: #f2f7fa }
.inborder li#open { background: #f2f7fa }
.inborder dt { padding-left: 8px; line-height: 21px; white-space: nowrap; height: 21px }
.inborder li { padding-left: 8px; line-height: 21px; white-space: nowrap; height: 21px }
</style>

<!-- search begin -->
<div class="yang_search_forum">
<div class="bbssou1">
<a href="#">包包</a> | <a href="#">眼袋</a> | <a href="#">饰品</a> | <a href="#">排毒</a> | <a href="#">减肥</a> | <a href="#">防晒</a> | <a href="#">黑眼圈</a>
</div>
<form accept-charset="gbk" onsubmit='document.charset="gbk";' action="http://www.discuz.net/search.php" method="get" target="_blank">
<input type=hidden value=014b8b87 name=formhash> <input type=hidden value=title name=srchtype> <input type=hidden value=all name=srchfilter> <input type=hidden value=desc name=ascdesc> <input type=hidden value=all name=srchfid> <input type=hidden value=dateline name=orderby> <input type=hidden value=forum name=mod>
<div class="bbssou2">
<table cellSpacing=0 cellPadding=0 border=0>
<tbody>
<tr>
<td align=right width=100>关键字:</td>
<td><input id=srchtxt maxLength=40 size=45 name=srchtxt></td>
<!--
<td align=right width=60>用户名:</td>
<td><input id=srchname maxLength=40 size=45 name=srchuname></td>
<td align=right width=50>论坛:</td>
<td>
<div id=bor1><input id=bbs_srchfid value=all name=srchfid[]>
<dl>
<dt>所有论坛 </dt>
<dd><ul>
<li title=shopping归来 value=95>shopping归来 </li>
<li title=折扣速递 value=54>折扣速递 </li>
<li title=二手闲置 value=80>二手闲置 </li>
<li title=全球代购 value=747>全球代购 </li>
<li title=名品试用 value=84>名品试用 </li>
<li title=搭配日记 value=34>搭配日记 </li>
<li title=美容护肤 value=36>美容护肤 </li>
<li title=减肥健身 value=62>减肥健身 </li>
<li title=旅游度假 value=94>旅游度假 </li>
<li title=食客天下 value=87>食客天下 </li></ul></dd></dl></div>
<script>Effect.SelectList("bor1","bbs_srchfid");</script>
</td>
-->
<td align=right width=70><input type=submit value="搜 索" name=searchsubmit></td></tr></tbody></table></div>
</form>
</div>
<!-- search end -->

这里需要注意一下编码!