Ads working on site but not on PHPbb

Discussion in 'Co-op Advertising Network' started by ian_ok, Feb 20, 2005.

  1. #1
    I get this error message:

    Warning: main(./ad_network.php): failed to open stream: No such file or directory in /home/sanlucar/public_html/forum/includes/page_tail.php on line 42

    Warning: main(./ad_network.php): failed to open stream: No such file or directory in /home/sanlucar/public_html/forum/includes/page_tail.php on line 42

    Warning: main(): Failed opening './ad_network.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sanlucar/public_html/forum/includes/page_tail.php on line 42

    Code added to page_tail.php
    
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    unset ($ad_network);
    $template->pparse('overall_footer');
    
    PHP:
    Webiste is:
    w w w.sanlucar-de-barrameda.com (removed as it's not quite ready yet...testing (forum is located at /forum)

    What am I doing wrong here?

    Ian
     
    ian_ok, Feb 20, 2005 IP
  2. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok I've got rid of the errors, but now the ads are not showing on the board!

    I hard coded ad_network.php file

    Changed this:
    include ($phpbb_root_path . 'ad_network.php');

    to:
    include ($phpbb_root_path . '../ad_network.php');

    And added this to the overallfooter.tpl

    // -->
    Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2002 phpBB Group<br />{TRANSLATION_INFO}</span></div>
    		</td>
    	</tr>
    </table>
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0];
    ?>
    </body>
    </html>
    
    Code (markup):
     
    ian_ok, Feb 20, 2005 IP
  3. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Doh......Now got it working, just read through all the instructions again.

    Thanks.

    Ian
     
    ian_ok, Feb 20, 2005 IP