Start customizing things in the code:
#############CUSTOMIZE HERE ###############
## SSI supported filename extension
## (usually .shtml, but sometimes configured in the server
## config file for use with .html or .htm)
$extension = '.shtml';
|
What is the extension of your pages? .shtml? .html? .htm? Make sure server-side-includes
are supported by whatever extension you use. The default configuration on most
Apache systems is to allow .shtml pages to use server-side includes. Some may
be configured to let other types of files (.html, .htm) process them, as well.
If you can’t get the <!--#echo
var="REQUEST_URI" --> on your test page to work, try it on a page
with a .shtml extension.
"But all my pages end in .html! You mean I have to change them all to .shtml?"
No, but if you want to get around changing everything, you’ll have to contact
your system administrator and ask him/her to change the config file to allow
files ending in your extension to parse server-side-includes.
## Separator you want to use for display between directories
## (Use of html-safe encoding recommended)
$dirseparator = ' > ';
|
This is where you determine what you want to use to separate the directories
with. Do you want a > symbol? The html code for this is > -
or if you wanted to use a slash, put in a slash, or a vertical bar | like in
the example here. HTML-safe encoding is recommended for any wierd characters.
Example:
## You must have a "directoryname, displayname"
## pair for each directory, or it won't show up.
%sitemap = (
misc, "Miscellaneous",
news, "News",
perl, "Perl",
photos, "Photos",
webdesign, "Web Design",
cin, "Cinnamon",
sunny, "Sunny",
);
|
This is where you assign names to the directories. The directory names in the directory hierarchy on your server is the left element in the pair, and your “english” display-name is the right element.
It doesn’t matter what order these are in, or how they pertain to the directory structure. Don’t use mydir/special, “Special Directory” to skip over mydir. Just don’t make mydir a pair, (but make a special, “Special Directory” pair) and it will skip over naming it.
## Uncomment this if your home directory is
## http://www.yourdomain.com/ (the site root)
## and give the home directory a display name
#$homedir = "Home";
|
This one’s pretty self-explanatory. Is your site root the same as the
domain-name root? (http://www.fifegeek.com/) Or is it a subdirectory on a
server owned by your friend, like mine used to be? (http://www.fifedrum.org/fifer/)
If it’s the same as the domain-name, then delete the # at the beginning of the $homedir = "Home"; line so it reads:
Example:
## Uncomment this and apply any classes, id's, or targets
## that need to go within the <a href> tag
#$hrefargs = 'class="menu" id="whatever" target="_blank"';
|
If you have a css style applied to hyper-links (within the <a href> tag), assign its value here and delete the # at the beginning of the line. If you don’t have anything, just leave it commented out.
Example:
$hrefargs = 'class="highlight"';
|
## Uncomment this and apply default pages for directories
## (Most people are best leaving this commented, which will
## use "index" as their default directory page)
#$defaultindex = 'home';
|
If you have a default page (other than index) for each directory (as is sometimes
the case when using frames) you’ll need to define the default page here. (<a
href="/directory/home.html">) Otherwise, href’s will go to <a
href="/directory/">
Example:
## Comment this out (put a # in front of $finalseparator = $dirseparator
## if you don't want to put in a title for index.(s)html
## pages
## i.e.
## Home > Documents
## instead of:
## Home > Documents >
$finalseparator = $dirseparator;
|
You don’t need to do anything here, unless you don’t want a final separator.
Some people would prefer to just leave the directory name for index pages,
and only add names for sub-pages of that directory.
If you want to leave the final separator off of
index pages, put a # in front of the line so it reads:
#$finalseparator = $dirseparator;
|
## Uncomment this (remove the # in front of #$finallink = 'none';
## if you don't want to put in a link for index pages
## pages
## i.e.
## Home > Documents
## linked > not linked
##
## RECOMMEND: Commenting out the $finalseparator = $dirseparator if
## you're going to uncomment this option, or it will place a
## final separator AFTER your unlinked directory name.
|
You don’t need to do anything here, unless you don’t want the final directory name to have a link.
Some people would prefer to just leave the directory name for index pages,
and only add names for sub-pages of that directory.
If you want to leave the final directory link off of
index pages, remove the # in front of the line so it reads:
It is recommended that you place a # in front of the $finalseparator = $dirseparator; line, as well (in the step prior to this).
################### STOP ##################
##Nothing below needs to be touched
################### STOP ##################
|
Good! You should be done customizing the script, and should be ready to stick it on a page!
|