Advanced forum and google adsense ads

pawi81 - July 5, 2009 - 12:01
Project:Advanced Forum
Version:6.x-1.1
Component:Other module integration
Category:support request
Priority:normal
Assigned:pawi81
Status:closed
Description

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

#1

Michelle - July 5, 2009 - 14:11
Status:active» fixed

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

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

Michelle

#2

pawi81 - July 5, 2009 - 20:11

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

pawi81 - July 5, 2009 - 20:11
Status:fixed» active

#4

Michelle - July 5, 2009 - 20:36
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

#5

pawi81 - July 5, 2009 - 20:49

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

pawi81 - July 5, 2009 - 21:48

sorry, i've got it :D

thank you

#7

System Message - July 19, 2009 - 21:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.