滚动
将代码嵌入到Drupal 7节点的主体中
论坛
伊万,您好,我按照您的建议做了,但似乎没有显示我所做的内容:
1) 安装了 Adsense 和 Adsense Injector 模块
2) 打开我的 node.tpl 并插入以下代码
<div class="node-content"<?php print $content_attributes; ?>>
<?php
// 现在隐藏评论、标签和链接,以便稍后渲染它们。
hide($content['comments']);
hide($content['links']);
hide($content['field_tags']);
print render($content);
?>
</div>
<div class="adsense-body1" style="margin-bottom:1em;">
<!-- 开始 Google AdSense 广告单元代码,由 Google 提供 -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3282980833393742";
/* 我的广告单元描述 */
google_ad_slot = "1235241790";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- 结束 Google AdSense 广告单元代码,由 Google 提供 -->
</div>
3) 在输入格式中允许使用 Adsense 标签
4) 进入模块 Adsense Injector 的设置 admin/config/content/adsense_injector
在 Inline Insertion 字段中插入:
<div id="adsense-body1" style="display:block;float:right;margin: 5px 10px 5px 10px;">[adsense:300x250:235241790]</div>
结果:http://floomby.ru/s1/Qfwwb/full/ 对于匿名用户广告不显示..... 请帮忙...