logo

额外区块类型 (EBT) - 全新的布局构建器体验❗

额外区块类型 (EBT) - 样式化、可定制的区块类型:幻灯片、标签页、卡片、手风琴等更多类型。内置背景、DOM Box、JavaScript 插件的设置。立即体验布局构建的未来。

演示 EBT 模块 下载 EBT 模块

❗额外段落类型 (EPT) - 全新的 Paragraphs 体验

额外段落类型 (EPT) - 类似的基于 Paragraph 的模块集合。

演示 EPT 模块 滚动

滚动

将代码嵌入到Drupal 7节点的主体中

22/02/2025, by 匿名 (未验证)
论坛

伊万,您好,我按照您的建议做了,但似乎没有显示我所做的内容:

 

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/ 对于匿名用户广告不显示..... 请帮忙...