Retour vers le sommaire programmation


"Extern_Link" for Unix


Written by Jacques Guellec, jguellec@altavista.net. This program is an emailware, if you use it, please, send me a mail.

French version

You can get http://perso.easynet.fr/~jguellec/program/perl/extern_link/extern_link_1.0.tar.gz.asc to check the integrity of the .tar.gz file. My PGP public key is in the html source of this document and on the PGP public key servers. Example: http://www.uk.pgp.net/pgpnet/wwwkeys.html

You may distibute Extern_Link under the terms of Artistic licence.

Download

extern_link_1.0.tar.gz

During the test of an HTML tree structure being placed on a CDROM, the tester found that extern links (Internet) might be embarrassing. The fact of clicking on these links, if the computer is not connected to Internet is a cause of error or an attempt of connection by the computer.

So it has been decided that clicking on an extern link must opening a window that inform the user on the nature of the link and offer to continue or to stop. Example

A very simple JavaScript function do this job very well and the real work of Extern_Link software is to add this function in each HTML file of a complete tree structure and the call to this function in each link with http or ftp of each HTML file of a complete tree structure.

All this, works very well, excepted when the argument of the link is target=_blank. The reason is unknown.

Installation

Download the archive extern_link_1.0.tar.gz and untar it with a tar zxvf where you want. A extern_link_1.0 directory will be created.

Update your PATH for the new directory to be recognize by the system. In Linux the PATH is in the /etc/profile file.

What does Extern_Link do

The software goes through a tree structure or a directory ans scan all the HTML files. It begin by adding the JavaScript function and a signature at the right of a HTML closing tag. </head> or </title>. This signature avoid that another function been written by Extern_Link.

After that it go through the tree structure again and add a function call in each link with http or ftp.

If a link is for example like this:

<a href=http://perso.easynet.fr/~jguellec>Web des Lilas</a>

After Extern_Link it will be like that:

<a href=javascript:onClick=extern_link('http://perso.easynet.fr/~jguellec');">Web des Lilas</a>

If necessary, it will be possible to remove all the function call by running extern_link with -rmd or -rmt argument..

Set Extern_Link

There is one configuration file, extern_link.conf.

Use


© Lilas - 98 / 99