Home | Examples | Reviews | Free download | Purchase | Web page help | Program help

HtmlPedigree: Miscellaneous

Index | Logs | Style | Chart | Tags | Links | Images | Dates | Pages | Home | Search | Miscellaneous

Customising the language of the web pages

By using the options on the "Tools" menu, you can specify the words used on the web pages to represent GEDCOM tags and dates (see How GEDCOM tags are interpreted and How dates are interpreted).

If you wish to go further, you can control all the wording that appears in the web pages generated by the program. This can be done by editing the contents of two files named parameters.txt and parameters_1.txt, which can be found in a subfolder named basefiles, within the folder set up when the program is installed (by default this folder is called HtmlPedigree, and typically it is found within C:\Program Files).

Each line of the parameters.txt file contains either the standard English wording, or a tag or other abbreviation, followed by a comma. You can change the wording that appears in the web pages by editing the part of the line following the comma. The parameters_1.txt file contains several blocks of HTML (mostly governing the content of the help pages). If you edit these, the changes will be reflected in the web pages generation by the program. (Note: It should not be necessary to make changes to the first section of the parameters.txt file - headed PARAMETERS - except that if you are producing pages in a language other than English, you should change the two-letter language code at the end of the section. This will affect the way some search engines classify results for your site.)

Editing these two files will change the default behaviour of the program. The "Tools" menu also offers the options of reading the program's settings (including language settings) from files on your hard disc, and of saving your settings to your hard disc.

Please contact info@htmlpedigree.com if you would like further advice and assistance with this process, particularly if you would like to produce web pages in a different language.

Using the customised 404 error page

If a visitor to your site requests a page that isn't found on the web server, the browser will normally display a standard plain page to indicate the error (known as a "404 error").

Depending on the system used by your web server, it may be possible to display instead a customised web page that gives the visitor more useful information. For this purpose, the program generates a web page named 404.htm, which contains links to the home page, indexes and help pages.

As well as uploading the 404.htm page together with the other web pages, you will need to arrange for the server to display it in response to 404 errors. How this is done depends on which software your web server uses. Further information is available at 404lounge.net and 404 Research Lab. (The first of these includes a facility to identify the system used by your server.)

Using a non-standard font face

The program provides a choice of several commonly available font faces. Before choosing to use a non-standard font face, note that if it's not available on the visitor's computer, your web pages won't have the intended appearance. You should definitely leave one of the common font faces as second choice, in case your first choice isn't available.

First generate a set of web pages, choosing the font face closest to the one you want. Then, using a simple text editor such as WordPad, edit the file named textstyle.css that the program has produced. Near the top, you should see something of this form:
font-family:"[1st choice font face]","[2nd choice font face]",[font family]
Type in the name of your preferred font face between the first set of quotation marks, in place of the font face that's currently there, leaving the second choice and the font family unchanged. Then resave the file, making sure that it's saved as text (without any special formatting).

Now run the HtmlPedigree program, use "Open" to read in the web pages, and then use "Save" to resave them. The new font face should now be used for both the text pages and the chart pedigrees. This should not be affected by further updates of the web pages.

Customising the display of linked files

When the program is used to link files to records from the GEDCOM file (see How to link images and other multimedia files), by default, when the link is clicked, the linked file will be displayed in a new browser window.

For users who can write JavaScript, this default behaviour can be modified by editing the file click.txt, which can be found in a subfolder named basefiles, within the folder set up when the program is installed (by default this folder is called HtmlPedigree, and typically it is found within C:\Program Files).

Within this file, the function icC determines the response to a click on the icon representing a linked file. The arguments of this function are: (1) the name of the linked file; (2) the caption of the file; (3) the heading of the associated record (for example the name of an individual) and (4) a number indicating the type of the file (1 for an image; 2 for audio; 3 for video; 4 for a web page; 0 for other types).

To specify a different response to a click on the link, insert your own JavaScript into this function, and make it return "false" instead of "true" to cancel the default behaviour. (To avoid interfering with the rest of the JavaScript used by the web pages, you should be sure to declare any added variables as local within this function for example, using var a; and so on.) The contents of the file click.txt should remain unaltered when you upgrade to a new version of HtmlPedigree, so that your customised behaviour should be preserved (but for safety you should keep a copy of the file elsewhere on your computer, in case there are any problems).

The following is a simple example script, which displays an image together with its caption in a new browser window. (NB If you copy and paste this code into the click.txt file, make sure that the lines containing the window.open and document.write functions aren't broken between lines.)

function icC(Eq,Ep,Eo,En){
if (En==1){
var newWindow=window.open("", "", "width=600, height=370, resizable=1, scrollbars=1, menubar=1");
newWindow.document.write("<HTML><HEAD><META HTTP-EQUIV='Content-Type' CONTENT='text\/html; charset=iso-8859-1'>");
newWindow.document.write("<TITLE>"+Ep+"<\/TITLE><LINK REL='stylesheet' TYPE='text\/css' HREF='textstyle.css'><\/HEAD>");
newWindow.document.write("<BODY><P><B>"+Ep+"<\/B><\/P><P><IMG SRC='"+Eq+"'><\/P>");
newWindow.document.write("<\/BODY><\/HTML>");
newWindow.document.close();
return false;}
return true;}