关于如何在F2blog日志中加入GGAD的问题,在网上搜寻了很长时间,一直没有找到满意的答案,今天闲来无事,慢慢研究了一番,问题终于解决,大家可以到我的博客看演示的效果,下面是具体的实现方法,欢迎拍砖!

在日志正文上方加入GGAD:

找到include/read.inc.php文件

查找以下代码

<div class="Content-body" id="logcontent_<?php echo $fa['id']?>" style="word-break:break-all; table-layout: fixed;">

在她上面加入以下代码即可实现

<script type="text/javascript"><!–
google_ad_client = "pub-1947268069139326";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//2007-10-13: 右侧文本
google_ad_channel = "4869624550";
//–>
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

如何在日志内容右侧加入GGAD:

查找<div class="Content-body" id="logcontent_<?php echo $fa['id']?>" style="word-break:break-all; table-layout: fixed;">

在她的下面加入以下代码即可实现

<div class=ad  style="float:right">
<script type="text/javascript"><!–
google_ad_client = "pub-1947268069139326";
google_ad_width = 200;
google_ad_height = 200;
google_ad_format = "200x200_as";
google_ad_type = "text";
//2007-10-13: 右侧文本
google_ad_channel = "4869624550";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "4C4C4C";
google_color_text = "000000";
google_color_url = "008000";
//–>
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

如果要在日志左侧加入,请把上面红色部分的right,改为left即可实现!

在日志内容正下方加入GGAD:

查找<?php if ($tags!="" || $tb_allow!=""){?>

在她上面加入以下代码即可实现

<script type="text/javascript"><!–
google_ad_client = "pub-1947268069139326";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
//2007-10-13: 右侧文本
google_ad_channel = "4869624550";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//–>
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

具体的实现效果大家可以看我的日志演示,有什么问题欢迎大家拍砖!

http://luckydog.net.?p=650