What, you ask, is The Information Cave? The answer is easy. The Information Cave is a large collection of links, 967 at last count, to many sites that I have been collecting since 1991. I read various news groups, comp.infosystems.announce and comp.infosystems.www.announce for example, that are used to let others know about new sites or ones that have changed recently.
So much for what, how about why? There are two main reasons. The first is that I actually use the links myself to surf the internet. I load software from Simtel via the Software page, find out what the weather is going to be like today via the Maps and Weather page, learn how to add that nifty feature to my web site via the Coding in HTML page, and the list goes on. The second reason is that I wanted to learn how to write HTML and this site is a good example of what I have learned. Except for CGI, in this site you will find examples of many aspects of HTML: tables, JavaScript mouseover image handlers, image maps and frames.
No doubt there are some links that you may find interesting and some that are less than interesting (i.e. broken). If you find problems with any of these links please fire off some email to tell me about it. Just click here to send your comments. If you have any questions or links you think I should have I would like to hear about it.
After thinking about it you may realize that some of the features of this site aren't too much trouble to do once, but keeping them up-to-date would be a real pain. I have learned, over the years, that computers can be pretty good at doing things that people might find really boring. Some of these things are:
All of the code that was used to implement these features is freely available. Much it is Perl, which is available for just about every type of computer. The rest of the code relies on the make program, which is available on just about every Unix computer, and variants, and through DJGPP which runs on PCs.
If you have been writing software as long as I have you will notice that this is Lisp code. Essentially it looks for a special text string and then moves ahead looking for a date string, removing it and then inserting the current time. What I have at the bottom of each page is text that looks like the following.
<!-- Insert modified date here --> <p> <small> Last modified Fri Apr 09 07:04:00 1999. </small> </BODY> </HTML> <!-- ;;; Local Variables: ;;; write-file-hooks: (insert-modified-date) ;;; End: -->
This contains the special text string and the Emacs directive to run the insert-modified-date function when the file is being saved. Real easy, eh?
title="Free Email Servers Spam Usenet News Providers Posting to News Groups"
The home page contains the following line:
#include "email.inc"The #include command is used to make the lines that make up the email.inc file part of the Email anchor which contains the tool tip description. All of the web pages are sent through the C preprocessor which will replace the #include lines with the contents of the file. When this is done, the anchor for the Email link will look like:
<A HREF="email.htm" onmouseover="display_status('free Email, Usenet and SPAM');return true" onmouseout="display_status('')" title="Free Email Servers Spam Usenet News Providers Posting to News Groups" >Click here to see the Perl script that manages the tool tips.
In the Software page there is a menu that allows you to pick the Simtel mirror site nearest to you for the best access. A Simtel mirror site is authorized by Simtel to keep a copy of all of their files, using the same organization as Simtel. The list of mirror sites changes periodically which means that the menu also needs to be updated periodically. There is a file at each mirror site that contains a list of the current mirrors. You can click here to see what the file looks like. The file is well structured which makes it suitable for scanning with a Perl script. This script generates the <OPTION VALUE> HTML codes to form a menu. The #include mechanism described earlier is used to pull it into the Software page. The Perl script also adds a date annotation below the menu to give an indication of how current the mirror site list is. Click here to see the Perl script.
Getting this set up properly was very difficult. There are several parts to this:
if (document.images) { redon = new Image(); redon.src ="images/grenon.gif"; redoff = new Image(); redoff.src ="images/redoff.gif"; } // Function to activate image. function imageOn(imageName) { if (document.images) { document[imageName].src = redon.src; } } // Function to deactivate image. function imageOff(imageName) { if (document.images) { document[imageName].src = redoff.src; } }The first part loads the two images with and without the green triangle. It doesn't get any simpler than that. The other two parts define functions that, when called, will show the green triangle and the blue circle (imageOn) or only show the blue circle (imageOff).
Defining code to create the anchor for the link and hooking it up with the JavaScript was quite difficult. The problem is that each link is separate and needs to be specifically identified so the JavaScript functions will turn on or off only that link's images. What was done was to have each link contain onmouseover and onmouseout handlers which will call the imageOn and imageOff functions, respectively.
<A HREF="the URL" onmouseover="imageOn('image0')" onmouseout="imageOff('image0')" > <img src="images/redoff.gif" border="black" name="image0"> The Link </A>Note that the imageOn and imageOff functions are called with a string as an argument which matches the name attribute in the <img>. If there are 50 anchors in a page then the above code needs to be generated for image0 through image50. This kind of tedium is an ideal candidate for some automation. To implement this a Perl script was written to scan through a page to generate a unique string for each URL. The difficult part was to have three strings be the same and have the next three strings, for the next link, also be the same but different from this link. To accomplish this a simple language was invented to define a numeric variable, allow one to reference it and allow one to increment it. A Perl script implements this language and will generate unique numbers for each link, to which the word "image" is prepended. Click here to see the Perl script that implements the language.
All of this extra gunk for each link would get to be a pain after a while. With the C preprocessor mentioned earlier one can use macros defined to contain the extra gunk. Referring to the macro will cause the C preprocessor to replace it with the gunk. A macro DO_BALL was defined to make defining new links easy. It contains the difficult part of the anchor, starting with the onmouseover handler and ending at the end of the <img>. This way defining a new link would look like:
<A HREF="the URL" DO_BALL The Link</A>A nice side-effect of this approach is that it is easy to change the image and have all links pick up the change.
#define HEADER(title) HEADER_NO_H2(title) <H2><A NAME="title">title</A></H2>#define HEADER_NO_H2(title) <HTML> <HEAD><TITLE>title</TITLE></HEAD> <BODY BACKGROUND="images/back05.jpg">
This purpose of these macros is to start off a page. The back.inc file contains the following:
<A HREF="index.html"> <img src="back.gif" border="black"> Back to The Information Cave home page</A>
This is used near the end of a page to allow one to jump back to the home page.
Back to The Information Cave home page
Last modified Thu Feb 10 21:03:26 2000.