Ooooh new stuff coming soon (we also have a new cron thingamabobber :D)
The Almighty Includes
Well, to start out, there are many ways to include things. All scripting languages have includes, like PHP. I'll be teaching you how to include pages with PHP (considering you have PHP support) and with SSI - server-side includes.
How can we use includes?... well, it's simple! Say you have a 30-page pokesite, and you're doing quite well, and your layout is nice. What happens when you add a new page?... you have to update every, single, other page. With includes, all you have to do is include the beginning half of the layout, write your content, then include the bottom half.
How can we do it? Well, first, you need to split your layout into two. So, take your most recently updated page, and do what the example does.
<html>
<head>
<title>Site Title</title>
</head>
<body>
CONTENT
</body>
</html>Our new page, fully equipped with includes, will require two additional pages to include. The first, which we'll call top.txt, contains all the code DIRECTLY above where you write your content. Which, in this example, is every single letter and symbol above "CONTENT".
So, select everything above your content area, copy it into a text file and save it as top.txt. Then, do that again, except copy everything IMMEDIATELY BELOW your content area - and save that as bottom.txt. Way back when, that was the part that confused me the most - I've tried to explain it as best I can, but if you're still having trouble, please contact me.
Continuing! Now we have both top.txt and bottom.txt prepared, which, when you put it together, contains the whole layout. Now we have to put the includes into place! I'll show you how to use SSI first. However, you should know that some hosts don't allow you to use SSI - in which case, you need to switch.
In order to use SSI, your file extension cannot be .htm(l) - it must be .shtm(l). (Note: Freewebs users: since you can't have an extension other than .html, go ahead and keep .html - Freewebs has enabled SSI for that extension.)
Now, simply copy this code into a page of your choice. If all goes well, your page should appear normally - except you've used includes!
<!--#include virtual="top.txt" -->
Your content goes in here!
<!--#include virtual="bottom.txt" -->If your host supports PHP, you can also use PHP includes. To do that, simply use the following instead:
<?php include("top.txt"); ?>
Content!
<?php include("bottom.txt"); ?>Hope you enjoyed this tutorial, and that you actually understand it! If you're having problems, or just don't understand, please feel free to contact me!
***
Copyright © Eevee's Headquarters 2008. All Rights Reserved. We do not own, do not work with, or are any part of any of the
owners or creators of Pokémon. This is just a fan site. Don't sue!














