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.

I searched but couldn't find it... help please!

Discussion in 'Co-op Advertising Network' started by cgo85, Nov 21, 2004.

  1. #1
    I searched the forum but couldn't find an answer to this. How can I set up the ad network on a phpbb forum? I'm trying to ad the ad code to the overall_footer.tpl . Can someone else that has done this please give me a quick summary. Thanks.
     
    cgo85, Nov 21, 2004 IP
  2. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just add:
    {AD_NETWORK}
    for 1 ad

    or:
    {AD_NETWORK} {AD_NETWORK2} {AD_NETWORK3} {AD_NETWORK4}{AD_NETWORK5}
    for 5

    Make sure it is before </html>

    I am presuming you have setup the ad_network.php, ad_network_ads.txt and includes/page_tail.php files.
     
    l234244, Nov 21, 2004 IP
  3. cgo85

    cgo85 Peon

    Messages:
    380
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    how should i set this up includes/page_tail.php ?
     
    cgo85, Nov 21, 2004 IP
  4. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Open the folder includes and find the file page_tail.php. Using the find function in a text editor look for:

    $template->pparse('overall_footer');

    Before this add:

    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    unset ($ad_network);
     
    l234244, Nov 21, 2004 IP
  5. cgo85

    cgo85 Peon

    Messages:
    380
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    k... got that to work but for some reason only showing one ad instead of five. I did put the: {AD_NETWORK} {AD_NETWORK2} {AD_NETWORK3} {AD_NETWORK4}{AD_NETWORK5} in the footer. I there something that I need to do to this:

    include ('../ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    unset ($ad_network);
     
    cgo85, Nov 21, 2004 IP
  6. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yeah if you wanna show 5 you need:

    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    unset ($ad_network);include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[0]));
    unset ($ad_network);include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK3' => $ad_network[0]));
    unset ($ad_network);include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK4' => $ad_network[0]));
    unset ($ad_network);include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK5' => $ad_network[0]));
    unset ($ad_network);
     
    l234244, Nov 21, 2004 IP
  7. cgo85

    cgo85 Peon

    Messages:
    380
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thank You!!!
     
    cgo85, Nov 21, 2004 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    You can shorten that if you want down to:

    include ($phpbb_root_path . 'ad_network.php');
    include ($phpbb_root_path . 'ad_network.php');
    include ($phpbb_root_path . 'ad_network.php');
    include ($phpbb_root_path . 'ad_network.php');
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[1]));
    $template->assign_vars(array('AD_NETWORK3' => $ad_network[2]));
    $template->assign_vars(array('AD_NETWORK4' => $ad_network[3]));
    $template->assign_vars(array('AD_NETWORK5' => $ad_network[4]));
    unset ($ad_network);
    PHP:
     
    digitalpoint, Nov 21, 2004 IP
  9. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #9
    No problem

    Shawn, is there any reason to change the code if I already have it setup?
     
    l234244, Nov 21, 2004 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #10
    No, the end result is the same.
     
    digitalpoint, Nov 21, 2004 IP