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

Michelle’s picture

Status: Active » Fixed

Put this at the end of advf-forum-post.tpl.php:

<?php if ($top_post): ?>
 ... adsense here ...
<?php endif; ?>

Michelle

pawi81’s picture


<?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 :/

pawi81’s picture

Status: Fixed » Active
Michelle’s picture

Status: Active » Fixed

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

pawi81’s picture

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>
pawi81’s picture

sorry, i've got it :D

thank you

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sp09’s picture

Where do you place the file at?

frenk’s picture

Version: 6.x-1.1 » 6.x-2.0-alpha3
Status: Closed (fixed) » Active

Where do have to put the adsense code with AF 2.0-alpha3?

Can't find advf-forum-post.tpl.php

Michelle’s picture

Status: Active » Fixed

advanced_forum.naked.post.tpl.php

Michelle

frenk’s picture

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pawi81’s picture

Status: Closed (fixed) » Active

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?

Michelle’s picture

Status: Active » Fixed

Same file. Keep in mind, though, that you can only have 3 Google ads on a page per their TOS.

Michelle

pawi81’s picture

Oh thank you, then i must pass it away :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kharonturk’s picture

I did as you said. But the adsence code is for each article.
Just do what needs to release two or three ads?

kharonturk’s picture

tonu110’s picture

Deleted