1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Ads in first post in PHPBB? My code isn't working

Discussion in 'phpBB' started by mizt, Sep 5, 2005.

  1. #1
    I'm trying to place ads within the first post on phpbb. I added the following code

    <?php if($postrow_i == 0) { ?> 
    
    <script type="text/javascript"><!--
    google_ad_client = "pub-5321002013560357";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text_image";
    google_ad_channel ="";
    google_color_border = "E1E8EC";
    google_color_bg = "E1E8EC";
    google_color_link = "234C60";
    google_color_url = "234C60";
    google_color_text = "000000";
    //--></script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    
    <?php } ?>
    PHP:
    It's still displaying on every post. Whats the if first post command in PhpBB? Thanks.
    SEMrush
     
    mizt, Sep 5, 2005 IP
    SEMrush
  2. Janissary

    Janissary Well-Known Member

    Messages:
    375
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    140
    #2
    
    <?php
    if($postrow_i == 0)
    echo $adsense;
    ?>
    
    PHP:
    or try "Banner Ad After First Post" hack by geocator < > (Brian) http://www.geocator.us
     
    Janissary, Sep 5, 2005 IP
  3. mizt

    mizt Active Member

    Messages:
    772
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    70
    #3
    Where do I declare $adsense = ad code
     
    mizt, Sep 5, 2005 IP
  4. Janissary

    Janissary Well-Known Member

    Messages:
    375
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    140
    #4
    extension.inc file in your phpbb root
    I always use it for my functions... or you can just use echo 'your adsense code';

    but as I said before the hack I refered will give you the ability to change the code from your admin panel.
     
    Janissary, Sep 5, 2005 IP
  5. mizt

    mizt Active Member

    Messages:
    772
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    70
    #5
    For some reason i can't get that mode to work with my template. If you want ot make a quick $10 let me know.
     
    mizt, Sep 5, 2005 IP
  6. Janissary

    Janissary Well-Known Member

    Messages:
    375
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    140
    #6
    yep, you can send me details....
     
    Janissary, Sep 6, 2005 IP