Can anyone tell me what I'm doing wrong? From page_tail: 'ADMIN_LINK' => $admin_link) ); include ($phpbb_root_path . 'ad_network.php'); $template->assign_vars(array('AD_NETWORK' => $ad_network[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network2[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network3[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network4[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network5[0])); $template->pparse('overall_footer'); Code (markup): From overall_footer: <p align="center"><basefont size="1">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p> </body> Code (markup): I did the other things too...
Thanks for the suggestion Ferrret. I know have this but it still doesn't work: <?php /*************************************************************************** * page_tail.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * * $Id: page_tail.php,v 1.27.2.2 2002/11/26 11:42:12 psotfx Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ) { die('Hacking attempt'); } // // Show the overall footer. // $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl') ); $template->assign_vars(array( 'PHPBB_VERSION' => '2' . $board_config['version'], 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 'ADMIN_LINK' => $admin_link) ); include ($phpbb_root_path . 'ad_network.php'); $template->assign_vars(array('AD_NETWORK' => $ad_network[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network2[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network3[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network4[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network5[0])); $template->pparse('overall_footer'); // // Close our DB connection. // $db->sql_close(); // // Compress buffered output if required and send to browser // if ( $do_gzip_compress ) { // // Borrowed from php.net! // $gzip_contents = ob_get_contents(); ob_end_clean(); $gzip_size = strlen($gzip_contents); $gzip_crc = crc32($gzip_contents); $gzip_contents = gzcompress($gzip_contents, 9); $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; echo pack('V', $gzip_crc); echo pack('V', $gzip_size); } include ($phpbb_root_path . 'ad_network.php'); $template->assign_vars(array('AD_NETWORK' => $ad_network[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network2[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network3[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network4[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network5[0])); exit; ?> Code (markup):
make the adnetwork section look like this: include ($phpbb_root_path . 'ad_network.php'); $template->assign_vars(array('AD_NETWORK1' => $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); Code (markup): and you should bo good to go.
Actually, it should look 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[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])); PHP:
I now ahve this, which only shows one ad instead of 5. Does anyone know why I only get one ad? Maybe my footer? <?php /*************************************************************************** * page_tail.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * * $Id: page_tail.php,v 1.27.2.2 2002/11/26 11:42:12 psotfx Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ) { die('Hacking attempt'); } // // Show the overall footer. // $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl') ); $template->assign_vars(array( 'PHPBB_VERSION' => '2' . $board_config['version'], 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 'ADMIN_LINK' => $admin_link) ); include ($phpbb_root_path . 'ad_network.php'); $template->assign_vars(array('AD_NETWORK' => $ad_network[0])); $template->assign_vars(array('AD_NETWORK' => $ad_network[1])); $template->assign_vars(array('AD_NETWORK' => $ad_network[2])); $template->assign_vars(array('AD_NETWORK' => $ad_network[3])); $template->assign_vars(array('AD_NETWORK' => $ad_network[4])); $template->pparse('overall_footer'); // // Close our DB connection. // $db->sql_close(); // // Compress buffered output if required and send to browser // if ( $do_gzip_compress ) { // // Borrowed from php.net! // $gzip_contents = ob_get_contents(); ob_end_clean(); $gzip_size = strlen($gzip_contents); $gzip_crc = crc32($gzip_contents); $gzip_contents = gzcompress($gzip_contents, 9); $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; echo pack('V', $gzip_crc); echo pack('V', $gzip_size); } exit; ?> Code (markup):
Same as before: <p align="center"><basefont size="1">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p> </body Code (markup):
In my includes/page_tail I have the following just above the exit: 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])); Code (markup): In my overall_footer, I have the following: <p align="center">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p> Code (markup): But the ads are not showing. What am I doing wrong? The forum is at http://civil-war-auctions.clickhereforit.com/forum/
I figured thats how it should be. You may want to edit your setup instructions slightly, either that or I just cant follow em properly. It took me a good while to figure out to change the additional ads to $ad_network[1], $ad_network[2] etc In the instructions it only states to change the 'AD_NETWORK' part of the code for additional ads. If you only do this it shows the exact same ad.