找回密碼
 註冊
搜索
查看: 2170|回復: 0

[X2.0] Discuz X2! 在本版塊規則右邊加入Google廣告

[複製鏈接]
發表於 2012-2-3 00:48:55 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
插件名稱: 本版塊規則右邊加入Google 廣告
插件來源: 原創插件  
適用版本: Discuz! X2  
語言編碼: BIG繁體
最後更新時間: 2012-01-28
插件作者: i4u2
版權所屬: i4u2.  
支持網站: http://forum.i4u2.biz/forum.php?mod=viewthread&tid=3374&extra=page%3D1



插件簡介: 本版塊規則右邊加入Google 廣告

[1]. 打開 template/default/forum/forumdisplay.htm 找到



  1. <div id="forum_rules_{$_G[fid]}" style="$collapse['forum_rules'];">
  2.                                                                 <div class="ptn xg2">$_G['forum'][rules]</div>
  3.                                                         </div>
  4.                                                 <!--{/if}-->

複製代碼

在<!--{/if}-->下方加入以下代碼





  1. <div style="margin:-170px 0 0 400px" id="G_ads">
  2.                                                         <script type="text/javascript"><!--
  3. google_ad_client = "ca-pub-9555819888986254";
  4. /* 300x250, 已建立 2011/6/15 */
  5. google_ad_slot = "6772144356";
  6. google_ad_width = 300;
  7. google_ad_height = 250;
  8. //-->
  9. </script>
  10. <script type="text/javascript"
  11. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  12. </script>
  13. </div>

複製代碼

*修改廣告位置可更改 <div style="margin:-170px 0 0 400px" id="G_ads">margin:後之數值
*其中 -170px指上方 0指右方 0指下方 400px指左方,更改其數值可變攻廣告出現之位置


 
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-5-1 15:12 , Processed in 0.019206 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表