PDA

View Full Version : SSI Server Side Includes Tutorial. Pt 3: The code for our example.


entimp
06-17-2003, 08:38 PM
Intro (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-25590.html) - Pt 2 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-2-the-ssi-25616.html) - Pt3 - Pt4 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-4-save-the-code-30534.html) - Pt5 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-5-yay-it-is-all-over-30535.html)

In this part you will find the code for our tutorial in standard HTML. We will then chop it up to turn it into includes. The only section that wont be here is the content section. The HTML will be very basic and is more for descriptive purposes rather than practical ones. I am sure with a few tweaks you could use this code.

Biology for Newbies... I like that site idea so I might work on this one day.

ok here is the plain Html we are going to cut up.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">

<head>
<title>Bioology for Newbies</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="title" content="Biology for Newbies... a new biology resource">
<meta name="description" content="Biological resources.">
<meta name="keywords" content="biology, science, evolution, genetics, blah, blah,">
<meta name="owner" content="email@address">
<meta name="author" content="authors names">
<meat http-equiv="charset" content="ISO-8859-1">
<meta http-equiv="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="VW96.OBJECT TYPE" CONTENT="Homepage">
<meta name="rating" content="General">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="2 weeks">
</head>

<body>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2">
<img src="image_files/header.jpg" alt="Page logo">
</td>
</tr>
<tr valign="top">
<td width="200" align="left" valign="top">
Navigation<br>
<br>
<a href="fambiologists/list.asp">Famous Biologists</a><br>
<a href="links/links.asp">Biology Links</a><br>
<a href="j_articles.asp">Journal Articles</a><br>
<a href="gallery.asp">Gallery</a>
</td>
<td>
Content Area
</td>
</tr>
<tr>
<td colspan="2">
This is the footer area. You can place anything you want here. Like contact
email addresses and general copyright information for example.
Maybe even a base image.
<td>
</tr>
</table>

</body>
</html>

As you will see the code above is broken into 7 areas, 4 red and 3 black. The colours don't mean anything other than to show where I am going to cut these files up to make the individual include files.

Again at work and things are a little busy. So the final step will be added tomorrow. I will also create a thread with links to each one of these so they can referance with ease in the future.

Any questions fire away.

Intro (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-25590.html) - Pt 2 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-2-the-ssi-25616.html) - Pt 3 - Pt 4 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-4-save-the-code-30534.html) - Pt 5 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-5-yay-it-is-all-over-30535.html)

Pegasus
08-13-2003, 02:44 PM
I only have one minor question, Entimp. Where's part 4? ;)

Peg

entimp
08-13-2003, 09:01 PM
Ok... I thought no-one was using this. Gimme between now and Tuesday next week to post it and make sure it flows correctly.

giz
08-14-2003, 02:07 PM
How about editing the first post in each thread to have a link pointing to the previous section and another one to the next section so that having stumbled across one part it is easier to find the other parts?

entimp
08-15-2003, 01:32 PM
I will do, I will also make a post linking them all together... and then include that in my signiture so anyone can gain access to the posts... make sense? Give me a few days to wrap it all up.

sh00ter555
02-21-2004, 04:17 PM
Ok, know im confused on the 'includes' part. what exactly does the 'includes' do? Can i just copy the code for html above and use that instead of making a bunch of .asp pages?
Would it be a lot easier for me just to make my whole table using .html and not .asp? If so what would i have to do differently?

Thanks,
Jason

scoutt
02-21-2004, 09:21 PM
it cannot be html. html doesn't have any power to include. if you do not want to use .asp then you must use .shtml. but your server has to support that extension.

you can add this

<!--#include file = "includes/header.asp" -->

in a file called index.shtml and it will include the file header.html if you want. you don't have to use asp for anything, but the file that is doing the including has to be .shtml at least.

sh00ter555
02-21-2004, 11:36 PM
Hmm,
I dont even know what shtml stands for?

I guess what im trying to figure out is, right now i currently have my website set up as frames. The address is Here. (http://www.freewebs.com/myflashanimations) And a lot of ppl are saying frames are bad if they wanna be in serch engines and stuff, so ive decided i wanna make my next website using a table layout. Kind of like entimp has explained in his tutorial. Although im confused in a few parts of the tutorial and dont know what to do. So if i dont use .asp u said i could use .shtml. How would i do that?

Thanks for the help scoutt. Its good to know now that html wont work for it, thats one less question i have.

jason

agent002
02-22-2004, 10:00 AM
.shtml is server-parsed HTML I think. It simply means, that it's a regular HTML file which contains SSI (server-side includes) code. To use SSI on your page, your server must support it. Just use the .shtml extension instead of .html, upload the files to your server and the server should parse the SSI tags when viewing the page.

sh00ter555
02-22-2004, 06:05 PM
Well my host does let me use SSI i dont think? Do you know a good free server host that does? I need it to be free for the time being.

scoutt
02-22-2004, 07:43 PM
nope I don't.

entimp
02-22-2004, 07:59 PM
http://www.brinkster.com/

Brinkster offers free ASP hosting. You will have to investigate if they offer SSI as part of this though. Click the start button for shared hosting and the first col is the free permissions.