搜索
查看: 11675|回复: 2
打印 上一主题 下一主题

在每个主题的顶部显示google广告

[复制链接]

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
跳转到指定楼层
1楼
admin 发表于 2007-10-16 02:56 |只看该作者 |倒序浏览
方法:
在模版文件 viewthread.htm 中查找
<!--{if !$typetemplate && $optionlist && $post['first'] && !$post['status']}-->

在其上加上:
  1. <!--//每页顶部显示google广告 -->
  2. <!--//把15改成你每页显示贴数:-->
  3. <!--{if ($post['number'] -1) % 15== 0}-->  
  4. <script type="text/javascript">
  5. <!--
  6. google_ad_client = "pub-6528653919057548";
  7. google_ad_width = 728;
  8. google_ad_height = 90;
  9. google_ad_format = "728x90_as";
  10. google_ad_type = "text_image";
  11. google_ad_channel = "";
  12. google_color_border = "FFFFFF";
  13. google_color_bg = "FFFFFF";
  14. google_color_link = "2D8930";
  15. google_color_text = "000000";
  16. google_color_url = "008000";
  17. //-->
  18. </script>
  19. <script type="text/javascript"
  20.   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  21. </script>


  22. <!--{/if}-->
  23. <!--//每页顶部显示google广告 -->
复制代码
记得把你自己的google ad client 代码放进

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
2楼
admin 发表于 2007-10-16 02:59 |只看该作者
DZ6.0正式版一楼帖子中加GOOGLE广告的方法

在一楼帖子上部加入GOOGLE广告的方法:

打开:
viewthread.htm

找到
<!--{if $adminid != 1 && $bannedmessages && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
在上边加入下边代码:

<!--贴内广告开始--><!--{if $post['number'] == 1 }-->
你的GooGle广告代码
<!--{/if}--><!--广告结束 -->

在一楼帖子下部加入的方法

找到
<!--{if $post['signature'] && !$post['anonymous'] && $showsignatures}-->

在上面加入

<!--贴内广告开始--><!--{if $post['number'] == 1 }-->
你的GooGle广告代码
<!--{/if}--><!--广告结束 -->
回复

使用道具 举报

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
3楼
admin 发表于 2007-10-18 04:38 |只看该作者
在一楼贴子上边加上GooGle广告的另外一种方法:

打开文件:
viewthread.htm
查找:

<h2>$post[subject]</h2>
<!--{/if}-->

在下边加上:

<!--{if $post['first']}-->这里写你的GOOGLE广告代码<!--{/if}-->

如果想在2楼3楼的帖子也显示的话 ,想想该怎么做吧。

first这个单词应该认识吧
回复

使用道具 举报

 懒得打字嘛,点击右侧快捷回复【左侧自定义内容】  【右侧自定义内容】
您需要登录后才可以回帖 登录 | Register

Mobile|Archiver|Naale Community

GMT+8, 2024-4-19 11:19 , Processed in 0.023732 second(s), 10 queries , Apc On.

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部