tpl files - overall_footer.tpl

Discussion in 'Co-op Advertising Network' started by webvivre, Dec 27, 2004.

  1. #1
    Added....
    [
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[0];
    ?>]|[
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[1];
    ?>]

    to the overall_footer.tpl file in phpBB bulletin board.

    No adverts showing.

    Have added:
    AddType application/x-httpd-php .php .htm .htm .tpl .html

    to .htaccess

    Any suggestions please...

    Thanks
     
    webvivre, Dec 27, 2004 IP
  2. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If im not mistaking no need to add that in the footer.tpl ,you ll need to add in your footer just this for example , {AD_NETWORK}::{AD_NETWORK2}::{AD_NETWORK3}::{AD_NETWORK4}::{AD_NETWORK5} ,then search in your root/includes/ for the file page_tail.php, add the code for example,
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0])); ,
    right there, in front of the line $template->pparse('overall_footer'); Follow the setup instructions carefully step by step and you ll do well
     
    crazyhorse, Dec 27, 2004 IP
  3. webvivre

    webvivre Peon

    Messages:
    249
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Partially successful.

    Have got the 1st advert to show but not the other four
     
    webvivre, Dec 27, 2004 IP
  4. webvivre

    webvivre Peon

    Messages:
    249
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I got it - just add
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[1]));
     
    webvivre, Dec 27, 2004 IP
  5. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You will need to add in the page_tail.php a line of code for each ad you like to display, take the example from above, then it would look like this.

    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[2]));
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK3' => $ad_network[3]));
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK4' => $ad_network[4]));
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK5' => $ad_network[5]));
    include ($phpbb_root_path . 'ad_network.php');

    That works for me..
     
    crazyhorse, Dec 27, 2004 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    You only need to do the include line once.
     
    digitalpoint, Dec 27, 2004 IP