Is this ad code ok?

Status
Not open for further replies.

yahia

New Member
Messages
338
Reaction score
0
Points
0
Hi,
Well, fearing of being unfairly suspended, I need to know if this advanced free hosting code for ads is ok (I edited it for page size reasons and standards):

HTML:
<div id="x10ad" lang="en">
 <script type="text/javascript" src="/site/x10ad.js"></script>
 <noscript>
  <div>
   <a href="http://x10hosting.com/advert/adclick.php?n=a915c788" hreflang="en">
    <img src="http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788" alt="advertisement image">
   </a>
  </div>
 </noscript>
</div>

The external javascript file contains:
HTML:
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script type='text/javascript' src='");
document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:3");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

It works like the original one. So, is it okay that I can keep it :eek4:
 

alvaroag

New Member
Messages
288
Reaction score
0
Points
0
no. that ad code isn't valid. you must use the ad code x10 provides you, without modifications. as you have the advanced plan, here is the correct ad code

HTML:
<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: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>

Alvaro
 
Last edited:

dest581

New Member
Messages
348
Reaction score
0
Points
0
Last I checked, alvaroag, you didn't really have the authority to make that statement ;)

Why is everyone so aggressive? Yahia is just requesting the right to make the ad code look nicer.

The "valid" (as named by alvaroag) isn't even valid code anyways.
 

yahia

New Member
Messages
338
Reaction score
0
Points
0
Well, I guess no admin would answer.
And good point, dest581. Thanks :)
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
That is way off, that would fail our verification. Are you trying to make the site XHTML, if you are make that javascript apart of the page and it would pass I bet.
 
Last edited:

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
Take mine:
Code:
<script 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:3&target=_blank"); 
   document.write ("&exclude=" + document.phpAds_used); 
   if (document.referrer) 
      document.write ("&referer=" + escape(document.referrer)); 
   document.write ("'><" + "/script>"); 
//--> 
 
</script><noscript><div><a href="http://x10hosting.com/advert/adclick.php?n=a915c788"><img src="http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788" alt="" style="border:0" /></a></div></noscript>
It has been approved.
 

dest581

New Member
Messages
348
Reaction score
0
Points
0
In response to Brandon (noerrorsfound beat me to post)
but it:

1) looks nicer
2) works
3) causes a tiny bit less bandwidth use
 
Last edited:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
But his wont be accepted, there is a key string must be in place, so to use that it would be a whole re-write of the ad checker. Not even x10 uses ~8 GB b/w and you know all the hits we get, so you must have a really popular site. If you are woried about b/w.......


Check this out: http://forums.x10hosting.com/adFreeOffer.php
 

yahia

New Member
Messages
338
Reaction score
0
Points
0
make that javascript apart of the page and it would pass I bet.

I don't understand. Do you mean the javascript code should be embedded inside the page?

additions:
I'm not worried about bandwidth. It is for good reasons to have javascript outside the page that's all. You guys should really think of a new ad code, just like the one I posted in the suggestions here...

Also, I should add a div inside <noscript> or otherwise, the xHTML or even HTML won't validate.
 
Last edited:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
If you are looking for XHTML Approved, seach the forums, I remeber one being approved awhile back.
 
Status
Not open for further replies.
Top