New x10 ad code

yahia

New Member
Messages
338
Reaction score
0
Points
0
Hello

The ad code of X10's free hosting service is really a pain to have in a website.
That's why I'm suggesting to make a code much easy for everyone.

For a valid webpage's html, the actual code looks like:
HTML:
<script language='JavaScript' type='text/javascript'>
// a lot of JS here
</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 this doesn't validate if you are authoring correct webpages.

But if you compare with the code they give at Technorati when you want to embed a bunch of links and stuff in your blog, here's the only thing you need to put:
HTML:
<script type="text/javascript" src="http://embed.technorati.com/embed/somecode.js"></script>
And in a config page in your account at technorati.com, you choose which stuff you want to be shown.

Isn't technorati's code better? It doesn't involve the user's source code in any way. The code stays clean, and everything is done from one line.

Can X10 do make an ad code like this one?
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Well the script is made from the script that x10 is using, so dunno.
 

YamiKaitou

Member
Messages
636
Reaction score
0
Points
16
Wouldn't that fall under editing the code? Cause if you look at the source code, can you not see the x10 ad code?
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
ya, maybe if you'd like to develop a script that would make it as easy as that, but as for now, we're using phpAdsNew, and that's what it outputs, we can't do anything about it, the whole script is in the code
 

t2t2t

New Member
Messages
690
Reaction score
0
Points
0
By what i got from what yahia said, i think that validation will be passed if faulty javascript is executed from a javascript file (*.js), so if code would be just for short something like following:

HTML:
<script type="text/javascript" src="http://www.x10hosting.com/ads.js"></script>

the faulty js inside it would not be readed in w3c validation, and it also would be smaller to be copied.

Interesting...
 
Last edited:

yahia

New Member
Messages
338
Reaction score
0
Points
0
Exactly, t2t2t.

and that will be much better because X10 will have control of the JS file.
The actual solution doesn't provide much X10 to modify its code on all pages that utilize it.

Also, it is very lightweight and practical that way for everyone to copy and paste in his code.
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Basicaly the one we have now dosnt have to be changed for new ads. If you are trying to get your page W3C validated, modify the code so that it works with the validation, then post it in free web hosting support, and we can approve it, as it dosnt have to be exact, but it needs to work and have certain data in it.
 

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
I use this:
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>
 

ArNoX

Member
Messages
414
Reaction score
0
Points
16
you can find the orginal ad code when you click on your account button :)
 

Zenax

Active Member
Messages
1,377
Reaction score
4
Points
38
Really, I don't bother with standards. I find that if the web page works how I want it too, then there is nothing wrong with the code.

Simple as that really. Same when I insert the ads! If they display fine then there is nothing wrong with them, and I can leave it alone, and not do anything to it.

Regards,
Zenax
 

YamiKaitou

Member
Messages
636
Reaction score
0
Points
16
Same with me. I hate having standards for coding. I like coding things my way. If it works, you shouldn't care how it is coded, just that it works. I can't believe that people actually are complaining that the ad code is not made to fit some stupid standard.
 

dest581

New Member
Messages
348
Reaction score
0
Points
0
You mean, like, the standard that browsers code to? :p

The standard is there for a reason, though this problem isn't big.
 

Cubeform

New Member
Messages
339
Reaction score
0
Points
0
Same with me. I hate having standards for coding. I like coding things my way. If it works, you shouldn't care how it is coded, just that it works. I can't believe that people actually are complaining that the ad code is not made to fit some stupid standard.


You hate having standards for coding, eh?

Well, what if your contractor that built your house hated the safety standards, and he cut corners? Hey, it's just some stupid standard! You can live in the house for the time being, so it's OK, right?

Or what if you go into a restaurant and the food was badly prepared? Hey, you can still eat it, right?

Or what if your electronic devices (including your computer) was built badly and didn't follow any safety codes whatsoever? It works for the time being, so screw the code!



Standards exist for a reason.

And, it's nice when the green bar shows up saying "Your website IS valid XHTML 1.0 Transitional!"
 
Last edited:

YamiKaitou

Member
Messages
636
Reaction score
0
Points
16
Coding and real life scenarios are different. As long as the code works like it should, why should you have to make it like everyone elses. It is perfectly fine to be unique and I like that. That is the good thing about coding, you can use multiple methods to achieve the same outcome. I just hate having to learn a coding language a certian way and not being able to have any freedom to fool around with it.

And, I have never even really tested my site if it is valid until recently. And it came up with like 26 errors on my main page alone. Most of it is because I don't make the values of the atributes literal strings unless I feel it is needed and not closing the <br> tag. I don't feel like fixing all of that just to have it be valid XHTML 1.0 Transitional. I have taught myself that this way works fine and I don't feel like attempting to change my methods that I have practiced so much

EDIT: Even these forums are not valid xhtml 1.0
 
Last edited:

DizzyTechnology

New Member
Messages
500
Reaction score
0
Points
0
Here's mine, it validates and cleanly integrates into your layout:

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 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><a href="http://x10hosting.com/advert/adclick.php?n=a7fb3e9d"><img src="http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d" style="border:0px;" alt="" /></a>
 

yahia

New Member
Messages
338
Reaction score
0
Points
0
I don't see why most of you came up saying that it isn't a problem for standards!

I didn't suggest this to have an ad. code that can be valid, no!

I'm suggesting to have a code which is one line. like technorati's. which in my opinion is very intelligent.

And for my ad code, here it is:

HTML:
<div id="x10ad">
 <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>

Having ONE LINE of code to insert in your webpages is much better. isn't it
 

DizzyTechnology

New Member
Messages
500
Reaction score
0
Points
0
It is a problem for standards. I don't understand why their ad application outputs invalid code... wasn't <noscript> in, like, Netscape 4?
 

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
If you use that on your website the automatic script will suspend you for no ads :)

I don't see why most of you came up saying that it isn't a problem for standards!

I didn't suggest this to have an ad. code that can be valid, no!

I'm suggesting to have a code which is one line. like technorati's. which in my opinion is very intelligent.

And for my ad code, here it is:

HTML:
<div id="x10ad">
 <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>
Having ONE LINE of code to insert in your webpages is much better. isn't it
 
Top