Error found in advanced advertisement code

Status
Not open for further replies.

pchelpworld

New Member
Messages
124
Reaction score
0
Points
0
Hi,

i have found an error in the advertisement code for advanced hosting. ?Basically i tried to put it into my phpbb footer and it would't display. I found the error (i think),

here is the original:
Code:
<?php BEGIN__VBULLETIN__CODE__SNIPPET <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 ("[URL="http://x10hosting.com/advert/adjs.php?n"]http://x10hosting.com/advert/adjs.php?n[/URL]=" + phpAds_random); 
   document.write ("&what=zone:3&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=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt='' /></a></noscript>

And here is the new:

Code:
<?php BEGIN__VBULLETIN__CODE__SNIPPET?> <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 ("[URL="http://x10hosting.com/advert/adjs.php?n"]http://x10hosting.com/advert/adjs.php?n[/URL]=" + phpAds_random); 
   document.write ("&what=zone:3&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=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt='' /></a></noscript>

you missed out "?>" to close the php tags confusing the php and the javascript area. Well, it works fixing it like that. Can anyone clarify that this is allowed and working correctly. Thanks

Maddocks
 

The_Magistrate

New Member
Messages
1,118
Reaction score
0
Points
0
That is not a problem with the Ad Code. You overwrote those two characters when you copied the code into your site. The line
Code:
<?php BEGIN__VBULLETIN__CODE__SNIPPET?>
is not part of the ad code, it's part of the vBulletin script. The fact that it was missing the end was because you accidentally deleted it.
 

pchelpworld

New Member
Messages
124
Reaction score
0
Points
0
Oh, sorry was it? i could have sworn that i copied it fully, maybe i copied it from a dodgy post? sorry my mistake
 
Status
Not open for further replies.
Top