ADJ網路實驗室
打印

[教學] Discuz 6.0下 修改Google代碼為自己的帳號

第二種方法

先找到論壇目錄下的 templates/default/discuz.htm (default為默認模板的路徑,如果你用的不是默認模板,請找到你的對應目錄)。

先找到下面的奇虎搜索代碼
引用:

<!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 1)}-->
  <td id="qihoosearch"{if $hottagstatus} style="width: 242px;"{/if}>
  <!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 1)}-->
   <form method="post" action="search.php?srchtype=qihoo">
    <input type="hidden" name="searchsubmit" value="yes" />
    <input type="text" name="srchtxt" value="$qihoo_searchboxtxt" size="20" />
    <select name="stype">
     <option value="" selected="selected">{lang qihoo_search_filltext}</option>
     <option value="1">{lang qihoo_search_title}</option>
     <option value="2">{lang qihoo_search_author}</option>
    </select>
     <button name="searchsubmit" type="submit" value="true">{lang search}</button>
   </form>
   <!--{if !empty($qihoo['links']['keywords'])}-->
    <strong>{lang qihoo_hot_searches}</strong>
    <!--{loop $qihoo['links']['keywords'] $link}-->
     $link
    <!--{/loop}-->
   <!--{/if}-->
   <!--{if $customtopics}-->
    <strong>{lang qihoo_custom_topics}</strong>  $customtopics [<a href="###">{lang edit}</a>]<br />
   <!--{/if}-->
   <!--{if !empty($qihoo['links']['topics'])}-->
    <strong>{lang qihoo_topics}</strong>
    <!--{loop $qihoo['links']['topics'] $url}-->
     {$url}  
    <!--{/loop}-->
   <!--{/if}-->
  <!--{/if}-->
  </td>
<!--{/if}-->
在它的後面增加
複製內容到剪貼板
代碼:
<!-- 自己附加的google搜索 -->
<td style="width:242px;" id="style_google_pp">
<style>
#style_google_pp td{padding:0;background:none;}
</style>
<!-- 此部分為你的Google搜索廣告代碼 -->
</td>
<!-- 自己附加的google搜索结束 -->這樣模板就搞定了。
不過還要記得去後台把奇虎搜索關掉,要不然挺難看的。





TOP

ARTERY.cn