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.

More then one ad?

Discussion in 'Co-op Advertising Network' started by PhilipB, Nov 3, 2004.

  1. #1
    How do I get more then one ad to show up, right now I have the code like this:

    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[0]));
    $template->assign_vars(array('AD_NETWORK3' => $ad_network[0]));
    unset ($ad_network);
    Code (markup):
    But it shows the 3 same ads, why so?
     
    PhilipB, Nov 3, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    It should be $ad_network[1] and $ad_network[2] for the additional ones. Also, you need to call the include 2 more times.
     
    digitalpoint, Nov 3, 2004 IP
  3. PhilipB

    PhilipB Peon

    Messages:
    211
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ah it works :) Thanks!

    BTW: Shawn, did that Hummer you have all come from profits from your site? Or other things aswell? I'm workin on gettin one :)
     
    PhilipB, Nov 3, 2004 IP
  4. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    similar problem.
    Why does the following code not produce multiple ads?

    include_once ('ad_network.php');
    echo $ad_network[0];
    include_once ('ad_network.php');
    echo $ad_network[1];

    It doesn't work like this either:

    include_once ('ad_network.php');
    include_once ('ad_network.php');
    echo $ad_network[0];
    echo $ad_network[1];


    Any ideas?
    thanks
    mark
     
    yonnermark, Nov 12, 2004 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    What does it produce, anything? Any errors?
     
    digitalpoint, Nov 12, 2004 IP