Alan's Tree Menu 2.40 - Configuration 1. General use.
 
The tree control applet was originally designed to operate in a narrow frame right or left of the main frame, and to load fresh pages into the main frame only. It can also, however, create new windows, change the contents of its own frame, or move the user to a completely different website. Anchor extensions are permissible. It need not be used in a frame at all. It may even be possible (but practical?) to use it with a long and low shape in a top or bottom frame.
 
2. The text file.
 
(a) General points
 
The applet works by reading in basic information about the structure of your web site from a text file which must be called 'tree.txt'. This text file must be uploaded and placed in the same directory as the 'tree.class' file (the applet itself). You can configure the applet for your own web site by writing your own text file. Any basic (or advanced) word processor can be used to produce such a text file.
 
(b) Writing the file
 
1. Each line in the text file contains one (and only one) entry for the navigation tree. The text file should not contain any empty lines.
2. The order of items in the text file must be the same as the order of the menu entries when all the folders are fully opened (i.e. ignore nesting).
3. The first item in each line must be the name of the web page (as you wish it to appear in the control).
4. The second item must be an integer (greater than or equal to 1) indicating how deeply nested the item is. The top level folder(s) has (have) the number 1, the next level 2, and so on.
5. The third item is the address (URL) of the link. It may be a short address; it may have a #-extension (anchor); it may be a full http://-address. Folders do not have addresses, so leave this (and the next item) blank if creating a folder. [NB: IE3 doesn't recognise java anchors; IE4 and all Netscape browsers are OK.]
6. The fourth item is the name of the frame where the page is to be loaded. Names such as _top and _blank are recognised, as well as any names you have given your own frames.
7. The final item is the comment to go in the status window when the mouse moves over the tree entry.
8. The five items in each line must be separated by four dollar-signs (but no spaces). If an entry is intentionally blank, you must still write the dollar signs (with nothing between). The applet checks this quite strictly, as it is a good way to help you avoid making other mistakes when writing the text file.
9. The final line should consist of a single percentage sign. (As percentage signs and dollar signs are special characters, these should not appear anywhere else).
10. The text file can have a maximum of 49 lines.
 
(c) Distinguishing folders and page links
 
The applet distinguishes strictly between folders and page links. A folder cannot have a page link attached to it. If you want the contents of a folder to have a general introduction or welcome, then put this page as the first item inside the folder, and entitle it accordingly. The applet distinguishes automatically between folders and page links - anything with further stuff nested inside it is assumed to be a folder; that is, if the next line in the text file is more deeply nested than the current line, it is automatically registered as a folder. If you try to attach a link to a folder, the applet simply ignores it.
 
(d) Example and troubleshooting
 
You can see an example text file (in fact the text file which drives the tree control of this website) by clicking here. Compare the file contents to the appearance of the tree control on the left to see what effect each line has. If you are still puzzled, trial and error are recommended. If there are problems with the text file, these are reported by the applet.
 
3. Parameters and the HTML file.
 
(a) Code to enter in the HTML file
 
The following code will embed the applet in a web page. The safest thing is to copy and paste this code into your HTML editor.
 
<APPLET CODE=tree.class WIDTH=150 HEIGHT=300>
<param NAME=copyright VALUE="© Image Intelligence Ltd. 1998 (www.imint.com)">
Enter parameter information here if needed (optional).
</APPLET>
 
No parameters, other than the copyright parameter, are necessary to make the applet run, although optional parameters can be used to change the colour scheme, text size and start up appearance. Size can be manipulated using the 'width' and 'height' attributes as described below. Note that if the copyright information is not exactly correct, the applet will fail to start - so please copy and paste to get it exact! This copyright parameter will only be visible to people who read your HTML code.
 
(b) Size settings
 
The applet automatically adjusts itself to whatever size is specified by the 'width' and 'height' attributes of the 'applet' tag (see above). In theory the applet could cover a whole web page, although in practice an applet with a width of about 150-170 and a height of about 300-400 would probably be most helpful. There are a two limitations: the width cannot be less than 130 and the height cannot be less than 160.
 
(c) Colour settings
 
The applet has numerous colour settings. The default setting, with no parameters, chooses a random colour scheme from six pre-determined colour settings each time the applet is loaded. The following parameter entry...
 
<PARAM NAME=colour VALUE=4>
 
...can be used to select between seven pre-determined colour settings. The 'value' attribute may have the values 0 to 6. Alternatively the colours used in the applet can be individually set by the user. The first four values in the following list set the frame and controls; the last three values set the colours of the tree window itself.
 
<PARAM NAME=main VALUE="......">   - the frame colour
<PARAM NAME=pale VALUE="......">   - upper and left sides of buttons and frames
<PARAM NAME=dark VALUE="......">   - lower and right sides of buttons and frames
<PARAM NAME=scroll VALUE="......">   - scrollbar background
 
<PARAM NAME=back VALUE="......">   - main background
<PARAM NAME=text VALUE="......">   - main text
<PARAM NAME=high VALUE="......">   - the moving text highlight
 
The values must all be hexadecimal colour codes. If any entry is invalid, the entire applet switches to its default colour scheme. The only colour on the applet that cannot be set is the text colour of the controls. This is chosen to contrast (tastefully) with the frame colour.
 
(d) Text and scroll size
 
The applet is designed to be potentially very compact, so as to leave a maximum of room for actual page content. If you find it too compact, you can adjust this by parameters. The text sizes 10, 11 and 12 are available. Size 11 is the default. The parameter 'textsize' can be used to select any of the three sizes. The default scroll bar width is narrow; this can be widened by using the parameter 'widescroll'.
 
<PARAM NAME=textsize VALUE=12>
<PARAM NAME=widescroll VALUE=on>
 
(e) Start up appearance
 
Users may also wish to have control over how much of the tree is visible when the applet first loads. The default setting shows the first two layers (i.e. everything in the text file with the nesting values 1 or 2). If the parameter 'nest' is used, folders with this integer value or less will be open on start up.
 
<PARAM NAME=nest VALUE=3>
 
4. Keycode version & extended parameters
 
This section tells you how the keycode and the extended parameters work. Everything you read above was available in the freeware version. If you buy a keycode (cheap!) then there are additional parameters allowing some functions which a lot of people have asked for. To buy a keycode, look at prices and ordering.
 
(a) The keycode parameter
 
To activate the extended parameters, you must first add a keycode parameter. You can test the effect of the keycode offline (i.e. locally) for free by entering the following dummy keycode:
 
<PARAM NAME=keycode VALUE="xyz">
 
This allows you to try before you buy. Once you have bought a keycode, enter it very exactly as the value of the keycode parameter (i.e. put it where it says "xyz" above). Keycodes are valid only for one site, which you must name when you buy the keycode. If you try to use the keycode at a different web location, the applet switches into freeware mode.
 
(b) Extended parameters
 
The keycode parameter allows you to configure
  • the text on the main title bar of the applet
  • the text on the "treeview" tab
  • the text in the "info" panel
  • Or in other words, it allows you to use the applet without showing our name anywhere. The parameters for changing these are as follows:
     
    <PARAM NAME=title VALUE="My Site">
    <PARAM NAME=treetabtext VALUE="My Menu">
    <PARAM NAME=info VALUE="Information about my site">
     
    Just put your own values in to change the various texts. The "info" tab information can be quite long and extensive. The text is automatically wrapped over the necessary number of lines, and scrolling may be used as necessary. If you want to force a line break at any point, use the special character "%" (percentage sign). Do not use a percentage sign elsewhere!