Discuz!nt2.5在快速搜索中加入google搜索广告
2008-10-15 16:03
423 查看
先申请Google AdSense帐号,然后取的AdSense搜索广告代码.
1.更改_quicksearch.htm文件加入google搜索按钮
<div id="searchbar"><dl>
<dt id="quicksearch" class="s2" >帖子标题</dt>
<dd class="textinput"><input type="text" name="keywordf" value="" class="text"/></dd>
<dd><input name="searchsubmit" type="submit" value="" class="s3"/></dd>
<dd><input id="btnGoogle2" class="btn_zzk" type="button" value="Google搜索" /></dd></dl></div>
2 在javascript目录下的common.js文件中加入
function SearchGoogle2()
{
var keystr = encodeURIComponent(document.getElementById('quicksearch').value);
window.location = "/search.aspx?keyword="+keystr;
}
function SearchGoogle() {
var keystr = encodeURIComponent(document.getElementById('searchKeyword').value);
window.location = "/search.aspx?keyword=" + keystr;
}
3 在dnt.css中更改#searchbar宽度,并加入google按钮样式
#searchbar { border: 1px solid #ccc; height: 24px; margin-right: 0px; line-height: 22px; width: 222px; background:#FFF;}
#searchbar .btn_zzk
{
border-top-style: none;
border-right-style: none;
border-left-style: none;
border-bottom-style: none;
cursor: hand;
}
4 在你要显示的页放好AdSense搜索广告代码,我比较懒直接放在了http://www.izhufan.cn/search.aspx中
专业制作模版,有需要的朋友请联系我.
1.更改_quicksearch.htm文件加入google搜索按钮
<div id="searchbar"><dl>
<dt id="quicksearch" class="s2" >帖子标题</dt>
<dd class="textinput"><input type="text" name="keywordf" value="" class="text"/></dd>
<dd><input name="searchsubmit" type="submit" value="" class="s3"/></dd>
<dd><input id="btnGoogle2" class="btn_zzk" type="button" value="Google搜索" /></dd></dl></div>
2 在javascript目录下的common.js文件中加入
function SearchGoogle2()
{
var keystr = encodeURIComponent(document.getElementById('quicksearch').value);
window.location = "/search.aspx?keyword="+keystr;
}
function SearchGoogle() {
var keystr = encodeURIComponent(document.getElementById('searchKeyword').value);
window.location = "/search.aspx?keyword=" + keystr;
}
3 在dnt.css中更改#searchbar宽度,并加入google按钮样式
#searchbar { border: 1px solid #ccc; height: 24px; margin-right: 0px; line-height: 22px; width: 222px; background:#FFF;}
#searchbar .btn_zzk
{
border-top-style: none;
border-right-style: none;
border-left-style: none;
border-bottom-style: none;
cursor: hand;
}
4 在你要显示的页放好AdSense搜索广告代码,我比较懒直接放在了http://www.izhufan.cn/search.aspx中
专业制作模版,有需要的朋友请联系我.
相关文章推荐
- csdn blog无法加入Google搜索解决办法
- Google Play Store启用AdWords搜索广告
- Google表示移动搜索广告价格将高于传统搜索
- Google搜索广告链接竟成木马传播渠道
- Google在英改变搜索广告模式 广告主拟集体诉讼
- 在自己的网站上加入GOOGLE和BAIDU的搜索
- Discuz!NT企业版之Sphinx全文搜索(上)
- Z-blog加入广告代码方法大全(google-adsense),别的也可.
- Unity3d通过苹果和google两种方法加入广告
- 宋体方法Unity3d通过苹果和google两种方法加入广告
- 网站加入Google搜索功能 嵌入Google搜索
- Google 2/3搜索广告收入来自iOS设备 而非Android
- 利用google快速搜索android源码
- Discuz!NT 2.5(20080826更新前)注入
- Discuz!Nt2.5聚合首页调用数据参数说明
- 百家搜索:在站点中加入Google、百度等搜索引擎
- Google 让你创作自己的 “巴黎之恋” 搜索广告
- 【IT动态】Google 移动搜索加入搜索应用程序功能,实用
- 关于在CSDN Blog公告栏加入Google搜索功能的问题
- 在csdn博客文章中加入google广告代码(adsense for content)