Log in

View Full Version : Forcing Advertisement



grantmitch1
05-30-2008, 06:41 PM
I have followed some tutorials on the internet on how to force an advertisement onto a series of pages in a subsite. None of these tutorials have actually worked.

I was wondering if someone could give me some code and explain how it works please. I would like the code to only affect designated subsites and affect all .html .php .htm files in the subsite.

Thank you
Grant

djr33
05-30-2008, 10:31 PM
Your terminology isn't quite clear.

What is a "subsite", and what do you mean by "force".

"Force" implies that you are aggressively doing something, more than just "placing" it, as if something is stopping you. Are you trying to force the viewers to see the ad? Trying to 'force' the page to accept it?

grantmitch1
05-30-2008, 10:34 PM
Sorry about that.

A subsite meaning in my site domian.org I will have another site within it.
sub.domain.org.

Force. I.e. if you use piczo they put a banner at the top of your page.

djr33
05-30-2008, 10:43 PM
So a "subsite" is one on a subdomain?

So you just mean "put". Force has a stronger meaning, like someone is trying to stop you.

Well, first you'll need your ads. You can try using google or other such companies, or even making your own contracts with companies. That's up to you and there are a few options.

Once you've got that setup, just make a single webpage that is just the ad itself.

Then include that webpage into your various other pages. I'd use PHP, like this: <?php include('../ad.htm'); ?>
But you can use SSI, asp, and maybe even (awkwardly) javascript.

Or you could just copy/paste if you don't wnat to deal with that, but it sounds like you want an automated process.