Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > All Around Tutorials
User Name:
Password:
 

 
 
  View Poll Results: How do you rate this tutorial?  
 
 
 
Don't give up your day job... (well night job actually) 1 11.11%
Not sure... ummm you left me speechless (probably just confused, how long do I leave it in the oven again?) 0 0%
Not bad at all... (it worked but I had to have it translated into French then English for me to understand it at all) 4 44.44%
Fantastic... (when is the book out and will you sign it for me?) 4 44.44%
Voters: 9. You may not vote on this poll

Closed Thread
Thread Tools   Display Modes
  View First Unread
 
Old 06-15-2003, 11:14 PM
  #1
entimp
I Quit WoW - Gimme Rep.
 
entimp's Avatar
 
Join Date: May 2002
Location: Liverpool UK (sometimes London)
Posts: 4,897
iTrader: (0)
entimp will become famous soon enough
SSI Server Side Includes Tutorial.

Intro - Pt 2 - Pt3 - Pt4 - Pt5

Navigation for this tutorial is now in my signiture below.

In response to a few direct requests for help regarding this issue and some that could be solved with the use of Server Side Includes I have decided to put together a basic tutorial.

Writing this is my free time at work I am going to try and break it up into two or three workable units. I will respond to comments and work on them where I see fit (don't complain about spelling though as you have a dyslexic teacher). This should make it easier for a complete novice to consume and also for me to write. I will add to this thread as an edit, unless it wont fit in the max message length.

1.0 Introduction
"Server Side Include/s" will be written in short as SSI for the rest of this tutorial.

It doesn't matter if you are a HTML pro moving on to XHTML or a complete newbie to writing pages for the internet. The uses of SSI are many fold and work wonders for dynamic or static pages. For the purposes of this tutorial I will be dealing with static pages only. If you want to progress onto dealing with SSI in dynamic pages then you will have to follow your own nose or persuade some other forum member to write a tutorial on one. This tutorial will be long enough without dealing with dynamic page content.

So what do you need?
  • A working knowledge of HTML
  • How to link files through various levels of a given directory structure (ideally)
  • A server that will provide server side permissions. In this case ASP. I am writing this for ASP users simply as that is where my experiance resides. I am sure users of PHP will be able to pick the gist of this up and transfer the inherent contents to their choice of server side platform.
To transfer this knowledge to you with some ease we are going to take a generic static web site and show how it could benefit from SSI.

We shall call this fictional website "Biology for Newbies".
Biology for Newbies is a web site that provide resources for students of... guess what... Biology. Although it can provide an awful lot of information in different content sections we are only going to give it 4 for the purposes of this tutorial.

These areas are: Famous Biologists, Biological Links, Journal Articles and Biological Photo Gallery.

The site has a typical layout. A header area for the site logo with a content area below that with navigation on the left and finally at the bottom a footer for other information.
Code:
**********************************
*       Header Area              *
**********************************
*   N    *                       *
*   A    *                       *
*   V    *    Content Area       *
*        *                       *
*   A    *                       *
*   R    *                       *
*   E    *                       *
*   A    *                       * 
**********************************
*       Footer Area              *
**********************************
A link clicked in the navigation area would open in the content area. This could be done in 3 common ways. With an Iframe, a HTML frameset, or as a new HTML document with navigation, header and footer as well. The HTML might look something like this (non frame version):
Code:
<html>
<head>
</head>
<body>
<table width="100%">
  <tr>
    <td colspan="2">Header Area</td>
  </tr>
  <tr>
    <td width="25%">Navigation area</td>
    <td width="75%">Content Area</td>
  </tr>
  <tr>
    <td colspan="2">Footer Area</td>
  </tr>
</table>
</body>
</html>
This is obviously very simplified but it serves our purpose. Just pretend it has all the meta tags in there and all the content.

Frames are fine to an extent so why bother with SSI? Good question! Frames do have their problems such as search engines and dissability issues. If you want high listings in search engine results these days you have to have content. Some search engines still have issues with reading the framed content. As for writing the new content for individual HTM documents this is time consuming especially if you have to change the format of the page. If you want to give your site a new paint job it can be soul destroying in editing each individual document in your site. This is where SSI comes to your rescue.

The next step is to understand how to use an SSI and how it works.

Intro - Pt 2 - Pt3 - Pt4 - Pt5
__________________

Last edited by Horus_Kol : 08-26-2008 at 05:34 AM. Reason: navigation
entimp is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-15-2003, 11:38 PM
  #2
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,465
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Maybe just make each section a new post, Entimp? That way people like me won't get lost quite so easily. *g*

Peg
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-16-2003, 09:02 AM
  #3
Ravenmoonheart
Soldier (Level 11)
 
Ravenmoonheart's Avatar
 
Join Date: Jun 2003
Location: Odenwald, Germany
Posts: 113
iTrader: (0)
Ravenmoonheart is on a distinguished road
more?

Oh I like this one. Is there more? This sounds like what I need.
Keep going please.
Thanks,
JS
__________________
The Picture is My Great Uncle Joe Dreaver.
----
You don't stop laughing because you grow old. You grow old because you stop laughing.
Michael Pritchard
Ravenmoonheart is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-16-2003, 11:10 PM
  #4
kevin
Super Deity (Level 18)
 
Join Date: Sep 2000
Posts: 10,217
iTrader: (0)
kevin is on a distinguished road
The use of SSI is not dependent on ASP or PHP or any anything like that, it just depends on if the web server is setup to parse the .shtm / .shtml pages
kevin is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-16-2003, 11:38 PM
  #5
entimp
I Quit WoW - Gimme Rep.
 
entimp's Avatar
 
Join Date: May 2002
Location: Liverpool UK (sometimes London)
Posts: 4,897
iTrader: (0)
entimp will become famous soon enough
Agreed... but it seems two of the most popular platforms for putting server side pages together are PHP and ASP. Each will have a slightly different syntax for doing the includes so I felt I needed to point it out from that point of view.

I am approaching this from a very simple angle... A way of putting a site together with some clever management of repeatable areas of markup. If anyone feels they like the taste I can only hope I have given them some kinda bug to learn a bit more about server side mechanics.
__________________
entimp is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-17-2003, 12:15 PM
  #6
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
Quote:
Originally posted by entimp
Agreed... but it seems two of the most popular platforms for putting server side pages together are PHP and ASP

Where did you get this info? I use ASP, Coldfusion, and JSP and I can't see where one is 'more popular' in using SSI than the other. Its not a matter of the language used, but the website author.

SSI isn't more popular with any language any more than dynamic web page creation. Its all a matter of author choice.
__________________
If you know the enemy and know yourself, you need not fear the result of a hundred battles.
If you know yourself but not the enemy, for every victory gained you will also suffer a defeat.
If you know neither the enemy nor yourself, you will succumb in every battle.

-Sun Tzu
Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 06-17-2003, 09:25 PM
  #7
entimp
I Quit WoW - Gimme Rep.
 
entimp's Avatar
 
Join Date: May 2002
Location: Liverpool UK (sometimes London)
Posts: 4,897
iTrader: (0)
entimp will become famous soon enough
Whats the deal... all it is, is a fricking tutorial... Have some time to waste at work and thoght I would do something constructive here... I have tried to help a few people with SSI here in the past and thought a better posting would be helpful to refer them to in the future. Is there a problem here or does anyone have anything else equally constructive to say.

Now if you read the post it does say "seems" and that amounts to this... from my experiance, ASP and PHP seems to be more popular.

I am writing this from my perspective and that is of ASP... I clearly noted that if anyone wanted to use this in PHP they would have to change a few things... this would be the syntax intially.
__________________
entimp is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 07-05-2003, 05:11 PM
  #8
giz
Is that code valid?
 
Join Date: Oct 2002
Location: UK
Posts: 3,101
iTrader: (0)
giz is on a distinguished road
>> Maybe just make each section a new post, Entimp? That way people like me won't get lost quite so easily. <<

... and then link each part to the previous and next part so that having found one part it is easy to get to the other parts.



Good start to the tutorial. Yeah, do some more sometime, and soon.
giz is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 03-25-2005, 12:58 PM
  #9
chiro
Novice (Level 1)
 
chiro's Avatar
 
Join Date: Mar 2005
Posts: 5
iTrader: (0)
chiro is on a distinguished road
Good job on the tutorial, I think it will realy help those that are just starting to learn this stuff!
chiro is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 03-25-2005, 06:18 PM
  #10
Ian
Sheriff (Almighty)
 
Ian's Avatar
 
Join Date: Nov 1999
Location: Chch New Zealand God Mode: On
Posts: 3,167
iTrader: (0)
Ian is on a distinguished road
Quote:
Originally posted by chiro
Good job on the tutorial, I think it will realy help those that are just starting to learn this stuff!
chiro, this thread is over 18 months old, please stop reviving old threads that are not current thanks.
__________________
Ian
Ian is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?

Closed Thread
KEEP TABS
SPONSORS
 
Boxedart
 
 


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



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:02 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.