Posted by pawi81 on July 5, 2009 at 12:01pm
Jump to:
| Project: | Advanced Forum |
| Version: | 6.x-2.0-alpha3 |
| Component: | Other module integration |
| Category: | support request |
| Priority: | normal |
| Assigned: | pawi81 |
| Status: | closed (fixed) |
Issue Summary
Hey,
I want to put into my advanced forum structure my one goodle adsense ad.
I want it like in phpbb - to be beetween first and second post for example
- FIRST POST
- GOOGLE ADSENSE ADS
- SECOND POST
- THIRD POST
what should i do? Should I rebuild some *.tpl ?
thank you
Comments
#1
Put this at the end of advf-forum-post.tpl.php:
<?php if ($top_post): ?>... adsense here ...
<?php endif; ?>
Michelle
#2
<?php if ($top_post): ?>
<?php print $topic_header ?>
<?php $classes .= $node_classes; ?>
<div id="node-<?php print $node->nid; ?>" class="top-post forum-post <?php print $classes; ?> clear-block">
<?php else: ?>
<?php $classes .= $comment_classes; ?>
<div id="comment-<?php print $comment->cid; ?>" class="forum-post <?php print $classes; ?> clear-block">
<?php endif; ?>
<div class="post-info clear-block">
<div class="posted-on">
<?php print $date ?>
<?php if (!$top_post && !empty($comment->new)): ?>
<a id="new"><span class="new">(<?php print $new ?>)</span></a>
<?php endif; ?>
</div>
<?php if (!$top_post): ?>
<span class="post-num"><?php print $comment_link . ' ' . $page_link; ?></span>
<?php endif; ?>
</div>
<div class="forum-post-wrapper">
<div class="forum-post-panel-sub">
<?php print $author_pane; ?>
</div>
<div class="forum-post-panel-main clear-block">
<?php if ($title && !$top_post): ?>
<div class="post-title">
<?php print $title ?>
</div>
<?php endif; ?>
<div class="content">
<?php print $content ?>
</div>
<?php if ($signature): ?>
<div class="author-signature">
<?php print $signature ?>
</div>
<?php endif; ?>
</div>
</div>
<div class="forum-post-footer clear-block">
<div class="forum-jump-links">
<a href="#top" title="Jump to top of page"><?php print t("Top"); ?></a>
</div>
<?php if (!empty($links)): ?>
<div class="forum-post-links">
<?php print $links ?>
</div>
<?php endif; ?>
</div>
</div>
If i put it here:
<?php if ($top_post): ?>
<?php print $topic_header ?>
<?php $classes .= $node_classes; ?>
<div id="node-<?php print $node->nid; ?>" class="top-post forum-post <?php print $classes; ?> clear-block">
<?php else: ?>
<?php $classes .= $comment_classes; ?>
<div id="comment-<?php print $comment->cid; ?>" class="forum-post <?php print $classes; ?> clear-block">
___________________google_adsense_code_________
<?php endif; ?>
there is in every or 2 first topics on the bottop where is "login to reply" google ads :/
#3
#4
That isn't where I said to put it; I told you to put it at the bottom. If you put it where I told you to, it will work like you want.
Michelle
#5
I'm sorry i'm bad at coding...
should i put it where the last endif is?
</div>
here google adsense ????
<?php endif; ?>
</div>
</div>
#6
sorry, i've got it :D
thank you
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
Where do you place the file at?
#9
Where do have to put the adsense code with AF 2.0-alpha3?
Can't find advf-forum-post.tpl.php
#10
advanced_forum.naked.post.tpl.php
Michelle
#11
Thank you!
#12
Automatically closed -- issue fixed for 2 weeks with no activity.
#13
One more question to this topic - already done with 6.x-2.0-alpha3 after top post google adsense - it's ok, but what if I want that my google adsense banner would show after every post - where should i put adsense code?
#14
Same file. Keep in mind, though, that you can only have 3 Google ads on a page per their TOS.
Michelle
#15
Oh thank you, then i must pass it away :)
#16
Automatically closed -- issue fixed for 2 weeks with no activity.
#17
I did as you said. But the adsence code is for each article.
Just do what needs to release two or three ads?
#18
This:
http://drupal.org/node/1282424