View Full Version : My ads are not showing up on PHPBB
jim
Dec 12th 2004, 1:30 am
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');
From overall_footer:
<p align="center"><basefont size="1">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p>
</body>
I did the other things too...
ferret77
Dec 12th 2004, 10:12 am
add it to page_tail.php right before the exit;
jim
Dec 13th 2004, 2:18 am
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;
?>
thebassman
Dec 13th 2004, 9:56 am
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); and you should bo good to go.
digitalpoint
Dec 13th 2004, 10:12 am
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]));
thebassman
Dec 13th 2004, 10:28 am
Why does mine look different?
digitalpoint
Dec 13th 2004, 10:31 am
I dunno... the way I posted though would be less resource intensive and cleaner on your end though.
thebassman
Dec 13th 2004, 10:34 am
Hmm... I think we changed mine a while back for whatever reason... don't want to frig with it. :P
jim
Dec 13th 2004, 10:33 pm
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;
?>
thebassman
Dec 13th 2004, 11:11 pm
Yeah, what do you have in your overall_footer.tpl file?
jim
Dec 14th 2004, 3:48 am
Same as before: <p align="center"><basefont size="1">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p>
</body
thebassman
Dec 14th 2004, 10:50 am
What's the URL?
Arnica
Dec 14th 2004, 11:29 am
Same as before: <p align="center"><basefont size="1">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p>
</bodyJim it looks like you've only 'filled' {AD_NETWORK}
Taken from your previous post.Same as before: 'AD_NETWORK'[/color] => $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]));
jim
Dec 14th 2004, 11:47 pm
Thanks Arnica! You win the prize. Jim it looks like you've only 'filled' {AD_NETWORK}
Taken from your previous post.
General Grant
Jan 12th 2005, 6:53 am
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]));
In my overall_footer, I have the following:
<p align="center">{AD_NETWORK}{AD_NETWORK2}{AD_NETWORK3}{AD_NETWORK4}{AD_NETWORK5}</p>
But the ads are not showing. What am I doing wrong?
The forum is at http://civil-war-auctions.clickhereforit.com/forum/
dcristo
Jan 12th 2005, 7:29 am
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]));
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.
dcristo
Jan 12th 2005, 7:31 am
But the ads are not showing. What am I doing wrong?
The forum is at http://civil-war-auctions.clickhereforit.com/forum/
The ads are showing from my end.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.