Scroll
Code for Adsense in the body of Drupal 7 nodes
Forums
Ivan, hello! It seems I've followed your recommendations, but nothing is displaying as I expected:
1) I installed the Adsense and Adsense Injector modules
2) I opened my node.tpl and inserted the following code
<div class="node-content"<?php print $content_attributes; ?>>
<?php
// Hide comments, tags, and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
hide($content['field_tags']);
print render($content);
?>
</div>
<div class="adsense-body1" style="margin-bottom:1em;">
<!-- START Google AdSense Ad Unit code, provided by Google -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3282980833393742";
/* My Ad Unit Description */
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>
<!-- END Google AdSense Ad Unit code, provided by Google -->
</div>
3) In the input formats, I allowed the use of the Adsense TAG
4) I went to the settings of the Adsense Injector module at admin/config/content/adsense_injector
and in the Inline Insertion field, I inserted:
<div id="adsense-body1" style="display:block;float:right;margin: 5px 10px 5px 10px;">[adsense:300x250:235241790]</div>
The result: http://floomby.ru/s1/Qfwwb/full/ for anonymous users, the ads are not showing..... Please help...