Old 19-08-2006, 09:07   #1 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
Blocking unwanted content

I'm helping my little brother with his harry potter fansite.
He's using godaddy's free hosting. The only problem is that it automagically inserts an adbar at the top of each page, about 2" tall.
I managed to hunt down the javascript it uses to do this:

here's the code

Now spare me all the "buy decent hosting" and "that's against the contract" crap, how could this be blocked? Perhaps you could give the iframe a negative margin in css or something clever like that? Though that could give a problem in that I'm planning to put some iframes on the actual site.
Any suggestions?

The site is here if you want to see the adbar in action. It might only appear after a few page visits.
  Reply With Quote
Old 19-08-2006, 12:30   #2 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
You probably shouldn't do that. I'm sure the terms of the free hosting require that the ads appear. Hiding the ads would be a great way to get your brother's account cancelled.
  Reply With Quote
Old 19-08-2006, 14:46   #3 (permalink)
Manticore
Registered User
 
Join Date: Aug 2006
Posts: 14
Quote:
Originally Posted by Luke A
who cares, I used to do it all the time when I was starting out. Never got booted off, and I am sure if you did it would only take a few moments to sign up for another one.

Just get a subdomain forwarder from www.cjb.net if they still do em, tell people the cjb.net address and if the hosting a/c get cancelled make another account and redirect the forwarder.

but cjb.net also has ads, so now he has like, and inch and a half of ads, rather than an inch... anyway, a really good host is http://dd.am I swear by them. Free, no ads, php, mysql, 100mb space (i think, maybe more) just gotta have a ftp program i believe, or they disabled file upload on my account... dunno... anyway, good host (instant signup too)
  Reply With Quote
Old 19-08-2006, 20:49   #4 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
Thanks, Luke A, the second method worked perfectly.
But guys, give it a rest. This is my 11-year old little brother's Harry Potter fansite in finnish that has max.300 visitors a month. Hardly a major crime to get rid of the annoying ads that wouldn't give godaddy any profit anyway.
I'm not expecting the FBI to burst through the door. Or CIA, whichever has those cool ninjas with machine guns that fly all over the world hijacking people off the street.
  Reply With Quote
Old 20-08-2006, 04:07   #5 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,512
Quote:
Originally Posted by bender
Thanks, Luke A, the second method worked perfectly.
But guys, give it a rest. This is my 11-year old little brother's Harry Potter fansite in finnish that has max.300 visitors a month. Hardly a major crime to get rid of the annoying ads that wouldn't give godaddy any profit anyway.
I'm not expecting the FBI to burst through the door. Or CIA, whichever has those cool ninjas with machine guns that fly all over the world hijacking people off the street.

You really need to get out more.
__________________
  Reply With Quote
Old 20-08-2006, 12:12   #6 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
Out? Now I'm confused...

Anyway, turns out it doesn't work.
Well, the second method works in opera but the other browsers still show it.
I tried a few other methods, like playing with the margins of the topmost content, giving the iframe a negative margin but i just couldn't get rid of it. Setting a negative margin on the content only made it hide under the iframe, as though it floats on top of the content.
I give up. Unless someone has any more clever tricks on how to beat this bastard?
  Reply With Quote
Old 21-08-2006, 09:40   #7 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
CSS?

Code:
iframe { display:none; }
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 22-08-2006, 11:35   #8 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
There are iframes on the site so could be a problem.
  Reply With Quote
Old 24-08-2006, 10:11   #9 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
give them a class of say myIframe and then add

Code:
iframe.myIframe { display:block; }
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 24-08-2006, 11:50   #10 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
That's actually a good idea. But didn't work...
Seems like godaddy wins in the end.
  Reply With Quote
Old 25-08-2006, 09:05   #11 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
You must be doing it wrong
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 25-08-2006, 16:53   #12 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
Nah, I put the iframe display:none as the sole css command for a page that only has one image. Doesn't work.

But I just realised that godaddy adds something other than the script at the end:

</body></html></object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>

The </body> and </html> are my tags. The rest of the crap isn't.
Now I'm not entirely sure css applies below the </html> tag, which is where the script is placed.

You can look at the page source if you wish.
pottermaailma.com/home
  Reply With Quote
Old 29-08-2006, 11:09   #13 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
One of us is wrong, and I don't think it's me...
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 29-08-2006, 11:49   #14 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 371
Ah, shit. I just copied your code without engaging the brain.
I'll fix it when I get home today. I still doubt it'll work.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8