Website Babble Webmaster Forums  
     Click to Download a Free, 3 Column CSS Web Template | Watch Instructional Video
  #1 (permalink)  
Old 03-15-2008, 01:03 PM
Master Babbler
 
Join Date: Nov 2007
Location: California
Posts: 108
Default an easy way to link ads into multiple pages on a site

hey everybody...
i'm almost finished with my website, but i have a question (like always)... i hope i used css correctly in order to do this, but, i've got like 13-17 pages of content pages on my site and i wanted to add that huge google ad on the left and right margins. so, is there any way i can use css (or another idea) where i can just put it on my css style sheet so that i don't have to go in and do each page manually? or, if i assume that my css style sheet is correct and organized correctly, is there any code i can include to do this? any help would be great.

thanks so much.
Reply With Quote
  #2 (permalink)  
Old 03-15-2008, 03:31 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Location: Dallas, TX
Posts: 2,855
Default

Hi digital,

I use include files for common areas on my site so I only have to update one file instead of updating each page. So my top, left, right and bottom areas are all include files.

So basically you create a file named rightSideAds.html and put only the ad code on this page. Then you call up this page from any page you want to display from using the "include HTML" code.

Here's a good tutorial for setting this up....

http://webmaster.iu.edu/tool_guide_info/ssi.shtml

Notice the instructions say you must use .shtml extensions instead of .html. You can modify your .htacess file on your server (located in your root directory of your web server where your index.html is located.) so you don't have to change the file extensions of your pages and keep everything .html

Open your .htacess file on your Web server in Notepad or another ASCII text editor and add the following line at the very bottom...

AddType text/x-server-parsed-html .html

That line will interpret .html pages as .shtml so you don't have to go and change the extensions on your 17 pages and lose any of your rankings with the search engines. One caution I've read is that doing so can affect the load on your server. I've been using this for over a year and haven't had any problems but just wanted to warn you.
Reply With Quote
  #3 (permalink)  
Old 03-15-2008, 09:34 PM
Master Babbler
 
Join Date: Nov 2007
Location: California
Posts: 108
Default

omg Lisa, I never even knew about that. you are so full of great answers!!! i'll try it, i should be getting a host in a couple of days. hey, you mentioned 'host gator'... do they use the cpanel? i heard cpanel is great for configuring your site. do you think it's true? and which host would you recommend?

thanks again!
Reply With Quote
  #4 (permalink)  
Old 03-15-2008, 11:21 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Location: Dallas, TX
Posts: 2,855
Default

Yup. They sure do have cpanel!

You are going to love using includes once you set them up.
Reply With Quote
  #5 (permalink)  
Old 03-16-2008, 04:21 AM
ssmorgan's Avatar
Supreme Babbler
 
Join Date: Jun 2007
Location: Tucson, Arizona
Posts: 784
Default

I found out about Server Side Includes (ssi) not too long ago, and I have been absolutely hooked on it! You should have no problem with it, but if you do, send a shout out... it's still fresh in my mind

Hostgator is great, by the way

Sherif
__________________
Connexins.com is Web Development Made Simple!

Eco-Friendly Fundraising | Success Starts Today | Let's Go Green!
Reply With Quote
  #6 (permalink)  
Old 03-16-2008, 12:10 PM
James's Avatar
Master Babbler
 
Join Date: Dec 2007
Posts: 314
Default More about includes

This is an excellent topic to pick up on because it does save a lot of work for people.

In addition to the site Lisa mentions you might want to check out:

http://www.boutell.com/newfaq/creating/include.html

It is very clear, also, and deals specifically with one or two additional points. There is one important one. If you have support for both ASP and PHP on your host, no problem. But otherwise there is a slight difference in the structure of the code required. Very simple difference but you know how that goes with code. All it takes is the presence or absence of a single unacceptable key stroke and you get to spend who knows how much time trying to figure it out.

Also, it is good to keep in mind that some free hosts in particular do not support this at all.

Good Success!

James
Reply With Quote
  #7 (permalink)  
Old 03-17-2008, 05:50 PM
Master Babbler
 
Join Date: Nov 2007
Location: California
Posts: 108
Default

omg Lisa, you are like a ray of sunshine, honestly, all of you guys are so awesome... i've never even heard of include files before. i'm going to take a look at the tutorial links that you attached.

thanks alot!!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 05:14 PM.



WB Sponsors

Profit Lance Review

WEB MARKETING



 Subscribe to the Website Babble Feeds

The place where beginners learn how to create a website.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0