The TXGenWeb Project Help File

The purpose of this page is to provide suggestions and ideas on how to make the task of maintaining your site a little less time consuming. If you maintain multiple sites or make frequent updates such as seasonal changes, these suggestions can save you a lot of time.

File Name Tips

To start with, I use a consistent naming scheme throughout all my pages and sites for files. I use this for both files I link to and graphic files in my pages. For instance, the bar you see in use on this page was named "line_ra2.gif" when I downloaded it from the web to use. This is the bar I presently use on all my pages at all my sites. But the file name I use in my pages is "line1.gif". When I want to change the look of the bar, I decide which graphic I want to use and simply upload it as "line1.gif". (I'll discuss how to do this easily a little further on) The bar shown on all my pages is instantly changed to the new look without having to go into the individual pages, find the code and change it. I do the same things with buttons, logos, pictures, backgrounds, etc. If you want to use multiple bars, buttons, etc., you just change the numeral for each unique element you want. You might have "line2.gif" as the bar at the bottom of the page.

I carry the naming theme through with all the graphics at the site as you can see if you go to the above url, place your mouse pointer over a graphic and right click to see the name. I use "line1.gif:, "button1.gif", "button2.gif", "back1.gif" is the background.

Using this method, I can completely change the appearance of 9 sites in less time than it takes someone to make the changes in the first page of one site.

I have found it beneficial to use consistency in name files between different sites. I always name the main page "index.htm" to use the WWW and browser convention of automatically loading this file name at a url. My lookup page is named "lookups.htm" at each site, links is "links.htm", etc. By using this method, there is a consistency of page design and code between each site as well as the pages. This allows me to use the #include directive of html to great advantage. I'll go over the use of the #include directive in more detail later in this page.

Hard Drive Tips

I set up my hard drive with a directory structure to support the methods I use in maintaining the pages. Since I have multiple sites, I use a top directory, call it projects, with subdirectories for each site and a couple other subdirectories to make things easy. These additional directories are graphics, common, backup. I've further subdivided the graphics directory into buttons, bars, logos, photos, etc. It looks something like the following.
In the directory for each site, I keep the latest version of each file unique for that site. In the graphics directory, I keep my library of graphic files, subdivided by type. The common directory is used for all files which are common to each site. This includes the graphic files such as line1.gif, button1.gif, back1.gif, etc. In the backup directory I keep a set of backup files for each site in a unique directory. This is just an extra step of precaution I take and isn't necessary to make use of these suggestions.

If I want to change the bar in my pages for example, I find the graphic file I want to use in the graphic\bars directory. I then copy it to the \common directory, changing the name to "line1.gif". When I update my site with new or updated files, the file "line1.gif" is uploaded and the appearance of all the pages is changed. Because it is common to all sites, the change is instant on all sites. All the files in the common directory are used on all my sites so it is easy to keep track of what files have been used.

FTP Tips

When I FTP, I have the window for home directory on my hard drive set to a default sort by date in descending order. That way the newest files are always on top. These are the files I want to upload if I've made any changes. I can easily select and upload the files which have been updated. I don't have to go down through the directory finding the files I need to upload. Actually, I have mine set up to automatically select those files which have been updated and upload them to the site.

#include Tips

HTML has a wonderful directive called #include which is a great benefit to simplifying site maintainenance. Instead of having to add the same code to each page of each site where you want it to appear, you simply use the #include directive where ever you want it and the pages appear as you want them. For instance, the code to produce the heading of this page and the other pages on my sites is:
<body text="#000080" bgcolor="#e6e8fa" link="#0000ee" vlink="#551a8b" alink="#ff0000" background="back1.gif">
<center><img src="logo1.gif" alt="texgenweb logo" height=90 width=90 align=absbottom>
<font size=+2><b>texas genealogy web</b></font><img src="logo2.gif" alt="usgenweb logo" height=90 width=90></center>
<center><img src="pict1.gif" alt="texas flag" height=60 width=80 align=absbottom></center>
Instead of typing this code into each page, I have placed it in a file named top.htm and I use the #include directive in my pages. The include directive would be
<!--#include virtual="includes/top.htm"-->
Using the #include directive, I can quickly make changes to all the pages by making changes to one file. For instance, if I wanted to increase the size of the Texas Flag (pict1.gif), I would simply change the width and/or height in the file "top.htm", upload the file and the size of the flag would be changed on all my pages.

This creates a high level of consistency in the appearance and functionality of different pages and sites.

If you have a group of links you use frequently, ie USGenWeb and TXGenWeb, you can put these into a separate files and use the #include directive. When it becomes necessary to update the links, you only need to do it once and upload the file to your site(s).

There are two types of #include directives you can use. I use the virtual include because I put all my includes in one folder.

The other type of #include directive would be coded
<!--#include file="top.htm"-->
This type of #include directive would look only in the current directory for the file. If you moved one of the files, you would have to change the coding to be sure the include worked.

Text Conventions

Using some conventions in the text of your pages can also help to simplify maintaining your sites and decrease the time it takes. For instance, at the bottom of most pages on most sites is a link to the main page. If you use the name of the county in the link, "Return to San Saba County Main Page", you will have to do much more manual changing than if you used the text "Return to Main Page" or "Home".

The code
<P><A HREF="index.htm">Back to San Saba County Main Page</A></P>
creates a link that at best has to have a separate #include file for each site and could cause you to have to code each page.

If you instead use the code
<P><A HREF="index.htm">Back to Main Page</A></P>
you can add this to an #include file that can be used on all your pages.

This works because of the text convention and file naming convention.

When Nothing Else Works

Even if you've done everything you can to simplify site maintenance there will still be instances when you can't avoid having to go in and change code. However, if you've been consistent in how you've laid out your pages and worded your text, you can still save time using a program that will search and replace text across multiple files. There are several available for DOS and Windows. I use Atomic which is a shareware program for Windows. When I want to replace text that occurs in multiple files on one or more sites that isn't in an #include file, I use Atomic to find and replace each occurance of the old text with the new text. A word of caution here, find and replace can have unexpected results if you aren't experienced with its use. It's not complicated but it does take some thought to be sure the results you want are achieved. If you have problems with find and replace or aren't sure about it, feel free to email me and I'll be glad to help you out.

Starting a New County

If you've set things up right, starting a new county is a piece of cake. Just set a new subdirectory for the new county, copy the files from an existing county to the subdirectory for the new county and use a program such as Atomic to go in and change all occurances of "San Saba County, Texas" to "Poke County, Alabama" and "txsaba" to "alpoke", for instance. Clean out the queries, lookups, etc. and you've got a new county up and going with just a minor amount of cleanup to do.


These points are only suggestions to make things easier and save time. If you have things that work for you, I'd love to hear about them and put them on here to share with others.