更新内容:
1.修正了与一些风格不兼容的BUG
2.只在首页,主题列表和帖子内容页出现
3.新增百度搜索提示
首先进入后台,工具--数据调用--新建--自由代码
名称:
内部调用_搜索
内容:
- <div id="zyhome" style="margin-top:-8px;">
- <div id="scbar" class="cl">
- <form id="scbar_form" method="post" autocomplete="off" onsubmit="searchFocus($('scbar_txt'))" action="search.php?searchsubmit=yes" target="_blank">
- <input type="hidden" name="formhash" value="b2e92bf7"/>
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td class="scbar_icon_td"></td>
- <td class="scbar_txt_td">
- <input type="text" name="srchtxt" id="scbar_txt" onblur="if (value ==''){value='搜索其实很简单 ^_^'}" onfocus="if (value =='搜索其实很简单 ^_^'){value =''}" value="搜索其实很简单 ^_^" autocomplete="off" class=" xg1" baiduSug=1>
- </td>
- <td class="scbar_type_td">
- <a href="javascript:;" id="scbar_type" class="showmenu xg1 xs2" onclick="showMenu(this.id)" hidefocus="true">帖子</a>
- </td>
- <td class="scbar_btn_td">
- <button type="submit" name="searchsubmit" id="scbar_btn" class="pn pnc" value="true">
- <strong class="xi2 xs2" color="#000000">搜索</strong>
- </button>
- </td>
- <td class="scbar_hot_td">
- <div id="scbar_hot">
- <strong class="xw1">热搜: </strong>
- <a href="#" target="_blank" class="xi2">高仿门户站</a>
- <a href="#" target="_blank" class="xi2">5D6D风格</a>
- <a href="#" target="_blank" class="xi2">5D6D代码</a>
- <a href="#" target="_blank" class="xi2">SClub代码</a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- </div></div>
- <script charset="gbk" src="http://www.baidu.com/js/opensug.js"></script>
复制然后提交
进入模板管理
打开css_common模板
在最下面加上
- /*-------------------search----bar-------------------*/
- #zyhome{background:#ffffff;width: {WRAPWIDTH} ;margin: 0 auto 5px; }#scbar_form{text-align:left;}#scbar,#scbar_form,.scbar_icon_td,.scbar_txt_td,.scbar_type_td,.scbar_btn_td{background-image:url(http://zyhome.66rt.com/attachments/month_1206/12061309582ee56758aa7a5eb9.png);}#scbar{background-position:0px 0px;background-repeat:repeat-x;}#scbar td{padding:0px;}.scbar_icon_td{background-position:0px -74px;background-repeat:no-repeat;width:50px;}.scbar_txt_td{background-position:0px -222px;background-repeat:repeat-x;}#scbar_txt{width:400px;border:1px solid #FFF;outline:none;font-size:14px;}.xg1,.xg1 a{color:#999999}.xs2{font-size:14px}.scbar_type_td{background-position:0px -370px;background-repeat:no-repeat;}#scbar_type{display:block;padding-left:5px;text-align:left;text-decoration:none;}.showmenu{padding-right:16px;background:url(http://zyhome.66rt.com/attachments/month_1206/12062110260961a911ff5ae7af.gif) no-repeat 100% 50%;cursor:pointer;white-space:nowrap;}.scbar_btn_td{background-position:0px -296px;background-repeat:no-repeat;text-align:center;width:67px;}#scbar_btn{margin:0;padding:0;border:none;background:transparent none;}.pn strong{font-weight:700;line-height:21px;padding-bottom:0px;padding-left:10px;padding-right:10px;padding-top:0px;}#scbar_hot{padding-left:8px;height:45px;overflow:hidden;}#scbar_hot strong,#scbar_hot a{line-height:44px;float:left;margin-right:8px;white-space:nowrap;}.xw1{font-weight:700;}#scbar{border:1px solid #c2d5e3;border-top-width:0px!important;};}
- #sousuo{width: {WRAPWIDTH} ;margin: 0 auto 5px; }
复制最后,打开discuz,forumdisplay,viewthread模板
找到
{subtemplate header}
在下面加上
{eval request('内部调用_搜索');}
即可!(3个模板都要加哦!)