找回密码
 成为会员

新浪微博登陆

只需一步, 快速开始

搜索
0赞
赞赏
手机版
扫码打开手机版
把文字装进口袋

把Google搜索换成自己的

冰客 2008-9-21 11:30:33
在include/javascript/google.js文件中将下列代码
  1. document.writeln('<script type="text/javascript">');
  2. document.writeln('function validate_google(theform) {');
  3. document.writeln('        if(theform.site.value == 1) {');
  4. document.writeln('                theform.q.value = \'site:' + google_host + ' \' + theform.q.value;');
  5. document.writeln('        }');
  6. document.writeln('}');
  7. document.writeln('function submitFormWithChannel(channelname) {');
  8. document.writeln('        document.gform.channel.value=channelname;');
  9. document.writeln('        document.gform.submit();');
  10. document.writeln('        return;');
  11. document.writeln('}');
  12. document.writeln('</script>');
  13. document.writeln('<form name="gform" id="gform" method="get" action="http://www.google.cn/search?" target="_blank" onSubmit="validate_google(this);">');
  14. document.writeln('<input type="hidden" name="client" value="aff-discuz" />');
  15. document.writeln('<input type="hidden" name="ie" value="' + google_charset + '" />');
  16. document.writeln('<input type="hidden" name="oe" value="UTF-8" />');
  17. document.writeln('<input type="hidden" name="hl" value="' + google_hl + '" />');
  18. document.writeln('<input type="hidden" name="lr" value="' + google_lr + '" />');
  19. document.writeln('<input type="hidden" name="channel" value="search" />');
  20. document.write('<div onclick="javascript:submitFormWithChannel(\'logo\')" style="cursor:pointer;float: left;width:70px;height:23px;background: url(images/common/Google_small.png) !important;background: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'images/common/Google_small.png\', sizingMethod=\'scale\')"><img src="images/common/none.gif" border="0" alt="Google" /></div>');
  21. document.writeln('  <input type="text" size="10" name="q" id="q" maxlength="255" value=""></input>');
  22. document.writeln('<select name="site">');
  23. document.writeln('<option value="0">网页搜索</option>');
  24. document.writeln('<option value="1">站内搜索</option>');
  25. document.writeln('</select>');
  26. document.writeln(' <button type="submit" name="sa" value="true">搜索</button>');
  27. document.writeln('</form>');
复制代码
将上面的代码里面的aff-discuz替换成自己的GG帐号?
麻烦懂的看看这样行不,行的话不会算作弊吧。。。。。。。
或许还要改哪里?
刚刚加入GG广告,还不太懂:lol
您需要登录后才可以回帖 立即登录 新浪微博登陆
小帖士
如果你不是特别对他的每一句话感兴趣,不要随意用"关注"人的功能,因为关注以后,他的所有发帖回帖都会以通知的方式提醒你的!
统计信息
  • 会员数: 4660 个
  • 话题数: 8707 篇
  • 巅峰数: 8 人
返回顶部