[PHPBB] Cant make the ads display

Status
Not open for further replies.

ibnuasad

New Member
Messages
34
Reaction score
0
Points
0
[SOLVED - Code Alterations]|[PHPBB] Cant make the ads display

Im using the default theme for phpBB(subSilver). I cant make the ads display on the header.

I edited the file 'overall_header.tpl'. If I put words such as 'xxxx', the word will display but if I add in the Javascript ads code...it wont display the ads..same thing happens with the php code. I've tried to use iFrame but still nothing appears.

Im clueless:dunno:

phpBB version: 2.0.21
phpBB theme: SubSilver (default theme)
Hosting Plan: Corporate

Site: http://ibnuasad.x10hosting.com/forum/ or http://forum.networldtalk.net

EDIT: Went to http://forums.x10hosting.com/cPanelLink.php to link account. No email received.

EDIT 2: Is there any way to customize the ads color becuase the black Yahoo! ads are not suitable for my forum.
 
Last edited:

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
have you tried using the php code, cuz (php)BB is built off of php lol i think just try using the php code
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
actually...try this..
Code:
$ads = "http://staff.x10hosting.com/adCode.php?ad=corporate"
then where you want to put the ads, put
Code:
include($ads)

but good try monkey, i am just learning php too :)
 

ibnuasad

New Member
Messages
34
Reaction score
0
Points
0
Where exactly should I put
Code:
$ads = "http://staff.x10hosting.com/adCode.php?ad=corporate"
?
 

ibnuasad

New Member
Messages
34
Reaction score
0
Points
0
SOLVED:

Finally fixed it! I used the Javascript code with a few minor adjustments.

Here's the ORIGINAL Javascript code:
<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 ("&what=zone:1&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&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&n=a7fb3e9d' border='0' alt=''></a></noscript>

And here's the ALTERED code
<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 ("&what=zone:1&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&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&n=a7fb3e9d' border='0' alt=''></a></noscript>

The changed code is in GREEN. I changed ' into "

=====================================

ADMINS, please take note of this code alteration. I dont want to get my account suspended.
 
Last edited:
Status
Not open for further replies.
Top