Putting up ads in forums help

Status
Not open for further replies.

BretFan1

New Member
Messages
108
Reaction score
0
Points
0
Just wondering if there is anyone here that can help me place the x10 ads in my forums at brethart.x10hosting.com/forum? I'm using PhpBB 2.0.16

If someone could tell me which file I should edit and where to place the code it would be greatly appreciated. Thanks!

PS- I'm also having an issue on my forums where the following comes up invisible at the top of my forums:


Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/brethart/public_html/forum/includes/page_header.php on line 44

Anyone know how to fix this?
 

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
overall_header.tpl modify that file to put the ads up, not sure were in that file but you should be able to figure it out.
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
well place the ad code as-is inside the overall_header.tpl as geoff said.

its found in /phpbb_root/templates/subSilver/overall_header.tpl

what you can do is place the code (again as-is) right underneith were you can tell the </div> from the links are. if you need more help i can show you a sample header with the code.

btw, you should update phpbb some security fixes :)
 

BretFan1

New Member
Messages
108
Reaction score
0
Points
0
Yeah, could you provide me a sample if you don't mind? I thought I put it in the right place but it is not coming up...
 

BretFan1

New Member
Messages
108
Reaction score
0
Points
0
Corey, etc....please do not suspend my site again as of right now for not having the ads up in my forums. I'm trying here and will have them up when I figure out how to do it here....I need help :/
 

randomize

New Member
Messages
674
Reaction score
0
Points
0
Yeah can easily be done on PHP BB forums

My mate has managed to do it.

Ill get him to send it me and I shall post it here, or ill get him to post it for yah!
 

randomize

New Member
Messages
674
Reaction score
0
Points
0
Here is the code for the overall header. The ad code is in red near the bottom


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/cs_red/{T_HEAD_STYLESHEET}" type="text/css">
<script language="javascript" type="text/javascript" src="templates/cs_red/scripts.js"></script>
<script language="javascript" type="text/javascript" src="templates/cs_red/formStyle.js"></script>
<link rel="icon" href="templates/cs_red/images/favicon.ico" />
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
/* window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400'); */
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body>
<a name="top"></a> <img id="formStyleTestImage" src="templates/cs_red/images/spacer.gif" />
<table width="{T_BODY_BACKGROUND}" cellspacing="0" cellpadding="0" border="0" align="center" id="maintable">
<tr>
<td valign="top" class="content-row"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="logotable">
<tr>
<td align="center" class="logorow1"><div class="logorow2"><a href="{U_INDEX}"><img src="templates/cs_red/images/logo_mid.gif" height="88" alt="{L_INDEX}" /></a></div></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="buttonstable">
<tr>
<td align="center" valign="middle" width="100%" id="header-buttons">
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}">{L_REGISTER}</a> •
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<a href="{U_PROFILE}">{L_PROFILE}</a> •
<a href="{U_PRIVATEMSGS}">{L_PRIVATEMSGS}</a> •
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH}">{L_SEARCH}</a> •
<a href="{U_FAQ}">{L_FAQ}</a> •
<a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a> •
<a href="{U_GROUP_CP}">{L_USERGROUPS}</a> •
<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="content">
<tr>
<td class="content" valign="top">
<!-- BEGIN switch_user_logged_in -->
<center><div class="pm-{PRIVMSG_IMG}"><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a></div></center>
<!-- END switch_user_logged_in -->
<!-- AD HERE --><div align="center">
<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("
http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:1&amp;target=_blank");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->

</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a></noscript>
<!-- AD END HERE -->

<p />
</div>
 
Last edited:

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
If that does not work try placing the ad code just above the "</script>" tag and see if that works.
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
you cant have the <!-- AD HERE --> and <!-- AD END HERE --> because phpbb parses all the comments and switeches them out with apropriate phpbb statements.

try without... otherwise ... ah nvm just a few minutes...
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
put the green text below, in the spotits in in the example to have the effect: http://www.outpost4.com/phpbb/

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
<style type="text/css">

[B][I]edit: took out CSS because of posts length[/I][/B]

</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
	if ( {PRIVATE_MESSAGE_NEW_FLAG} )
	{
		window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
	}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center"> 
	<tr> 
		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr> 
				<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
				<td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span> 
				<table cellspacing="0" cellpadding="2" border="0">
					<tr> 
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp; 
						<!-- BEGIN switch_user_logged_out -->
						&nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a>&nbsp;
						<!-- END switch_user_logged_out -->
						</span></td>
					</tr>
					<tr>
						<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
					</tr>
				</table></td>
			</tr>
		</table>
[COLOR="DarkGreen"]		<br />
	<div align="center">
	<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:1&amp;target=_blank");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a></noscript>
	</div>[/COLOR]
	<br />
 

BretFan1

New Member
Messages
108
Reaction score
0
Points
0
Wow this is frustrating. I have the code you guys recommended above in my overall_header.tpl file now, and as you can see if you go to: http://brethart.x10hosting.com/forum the ads still are not coming up. I don't know what the problem is.... here's what I have:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/subBlack/{T_HEAD_STYLESHEET}" type="text/css" />
<style type="text/css">
<!--
TH { background-image: url(templates/subBlack/images/{T_TH_CLASS2}) }
TD.cat { background-image: url(templates/subBlack/images/{T_TH_CLASS1}) }
TD.rowpic { background-image: url(templates/subBlack/images/{T_TH_CLASS3}); background-repeat: repeat-y }
TD.catHead,TD.catSides,TD.catLeft,TD.catRight,TD.catBottom { background-image: url(templates/subBlack/images/{T_TH_CLASS1}) }
-->
</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="200"><a href={U_INDEX}><img src="templates/subBlack/images/logo_phpBB.gif" width="200" border="0" alt={L_INDEX} vspace="1" /></a></td>
<td align="center" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
<!-- BEGIN switch_user_logged_out -->
&nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>&nbsp;
<!-- END switch_user_logged_out -->
</td>
</tr>
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subBlack/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
</tr>
</table></td>
</tr>
</table>
<br />
<div align="center"> <script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script> <script language='JavaScript' type='text/javascript'> <!-- if (!document.phpAds_used) document.phpAds_used = ','; phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11); document.write ("<" + "script language='JavaScript' type='text/javascript' src='"); document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random); document.write ("&amp;what=zone:1&amp;target=_blank"); document.write ("&amp;exclude=" + document.phpAds_used); if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer)); document.write ("'><" + "/script>"); //--> </script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a></noscript> </div>

 

unpixelatedgamers

New Member
Messages
674
Reaction score
0
Points
0
Go into the folder where the style is that you have used. Then put the javascript code for the ad near the bottom of the code in the overall_header.tpl file.

Or, have you done that already?

edit: Hang on. You're using subBlack template right? Silly me.

I'll go and have a look what i did on our fourms. Even though randomize has already posted it.
 
Last edited:

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
um let me go check this out :)

i'll just pretend i'm part of the tech team right now lol...


edit: http://brethart.x10hosting.com/forum
next time make sure you dont replace lines, you have to keep the lines broken up it cant all be one line of code.
 
Last edited:

BretFan1

New Member
Messages
108
Reaction score
0
Points
0
Hey man, well somehow you managed to get the ads to come up on my site. Thanks :)

While you're at it...do you have any idea why the following error message comes up at the top of my forums (it's only visible if you highlight the gap at the very top of the page):


Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/brethart/public_html/forum/includes/page_header.php on line 44


I've tried editing line 44 of that file and can't get it to go away.

Thanks again!!!
 

blackroselove

New Member
Messages
244
Reaction score
0
Points
0
your ads and everything seems to be fine no error well done! yes i know this a late entry but hey i want o help!
 
Status
Not open for further replies.
Top