How to modify the Google search bar of the discuz! forum program

Source: Internet
Author: User
Tags button type modify domain name
google| Program | forum | Search |DISCUZ

In the discuz! forum background to enable Google search, and then select the location to display the Google search box, there are: on the front page of the forum display, in the Theme List page display, the theme content page display, recommend all options. As for the following choice of language that's all right, because we don't call this.

Locate the \include\javascript google.js file in the forum root and replace it with the following:

Document.writeln (' <form method= ' get "action=" Http://www.google.cn/search "target=" Google_window ">");
Document.writeln (' <table border= "0" bgcolor= "#ffffff" > ");
Document.writeln (' <tr><td nowrap= "nowrap" valign= "" Top "align=" left "height=" > ");
Document.writeln (' <a href= ' http://www.google.com/">");
Document.writeln (' </img></a> ");
Document.writeln (' </td> ');
Document.writeln (' <td nowrap= ' nowrap ">");
Document.writeln (' <input type= "hidden" name= "domains" value= "www.alixixi.com;js.alixixi.com" ></input> ');
Document.writeln (' <label for= "SBI" style= "Display:none" > enter your search term </label> ');
Document.writeln (' <input type= "text" name= "Q" size= "" maxlength= "255" "value=" "id=" SBI "></input>");
Document.writeln (' <label for= "SBB" style= "Display:none" > Submit search Form </label> ');
Document.writeln (' <select name= ' SiteSearch ">");
Document.writeln (' <option value= ' "> Homepage </option> ');
Document.writeln (' <option value= "www.alixixi.com" > main station </option> ");
Document.writeln (' <option value= ' js.alixixi.com ' > Special Effects </option> ');
Document.writeln (' </select> ');
Document.writeln (' <button type= "submit" name= "sa" value= "search" id= "SBB" > Search </button>);
Document.writeln (' <input type= "hidden" name= "Client" value= "pub-6261914751398528"></input>");
Document.writeln (' <input type= "hidden" name= "Forid" value= "1" ></input> ");
Document.writeln (' <input type= "hidden" name= "prog" value= "AFF" ></input> ");
Document.writeln (' <input type= "hidden" name= "ie" value= "GB2312" ></input> ");
Document.writeln (' <input type= ' hidden "name=" oe "value=" GB2312 "></input>");
Document.writeln (' <input type= "hidden" name= "safe" value= "active" ></input> ");
Document.writeln (' <input type= "hidden" name= "hl" value= "ZH-CN" ></input> ");
Document.writeln (' </td></tr></table> ');
Document.writeln (' </form> ');

Where www.alixixi.com and js.alixixi.com are replaced by your own domain name,pub-6261914751398528 replaces your Google id,gb2312 with the page encoding you want. As for some other needs to be modified, you can do it yourself.

Demo example can visit the Arisisi home page, http://www.alixixi.com/to see Google's search bar effect.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.