先轉貼gladtime在留言板的提問:
  您好:冒昧的打擾!
  由於痞客沒有提供blog文章的搜尋
  因此想請問您如何將google的搜尋器
  放進自己的blog中呢?
  謝謝!


因為在留言板不好回答,乾脆就來寫一篇我的作法給大家參考囉。


AdSense for Search放入自己的blog

1.首先就是要有AdSense的帳號。申請網頁點此
2.登入AdSense之後,AdSense 設定>>  AdSense for Search>>會看到以下畫面:

     Google WebSearch + SiteSearch

 

 

    讓使用者能直接從您的網站搜尋網路,或是您喜好的特定網站。

    輸入三個 URL 以便進行 SiteSearch:

    http://  

    http://

    http://




3.上面的網址如果是直接貼上網誌的網址,總是會出現錯誤訊息,所以乾脆先輸入痞客和無名首頁的網址,之後再手動更改程式碼。

4.照著申請網頁上的步驟依依設定完成後,複製它提供的程式碼並先做適當的編輯

5.下面就直接貼上我的程式碼和修改的地方:

<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com.tw/custom" target="google_window">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle" width="75" height="32"></img></a>
<br/>
<input type="hidden" name="domains" value="pixnet.net/shing525;pixnet.net/guestbook/shing525"></input>
<label for="sbi" style="display: none">輸入搜尋關鍵字</label><input type="text" name="q" size="40" maxlength="255" value="" id="sbi"></input>
</td></tr>
<tr>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="搜尋網頁"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="pixnet.net/shing525" checked id="ss1"></input>
<label for="ss1" title="搜尋 Blog內容"><font size="-1" color="#000000">Blog</font></label></td>
<td>
<input type="radio" name="sitesearch" value="pixnet.net/guestbook/shing525" id="ss2"></input>
<label for="ss2" title="搜尋 Guestbook內容"><font size="-1" color="#000000">Guestbook</font></label></td></tr>
</table>
<label for="sbb" style="display: none">提交搜尋表單</label>
<input type="submit" name="sa" value="搜尋" id="sbb"></input>
<input type="hidden" name="client" value="pub-9026819492588193"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="UTF-8"></input>
<input type="hidden" name="oe" value="UTF-8"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;
LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;
LH:100;LW:100;L:
http://s.pimg.tw/album/shing525/element/54365815/zoomcrop/200x200.jpg"#000000">checked是讓預設值選擇搜尋blog內容,其他應該
應該很好懂,記得改成自己的帳號就行了。

醬,有看懂嗎?
arrow
arrow
    全站熱搜

    Shing 發表在 痞客邦 留言(9) 人氣()