1. Introduction 1.1. The Structure of Site-Info 2. Installation 2.1. Server Setup 3. Usage 3.1. File Information 3.2. The Index Database 3.3. The Author Database 3.4. The Host Database 3.5. The External Index Database 3.6. The Forms-Mail Interface 3.7. Reports
All the scripts (except config.pl) contain a set of functions which can
be invoked by passing a command to them within the query-string
of the calling url. Some of the scripts will take additional information
out of the query string, others get it by interpreting fill-out-forms.
The general format for calling a site-info function thus looks like this:
http://server/site-info-root/script?function[?additional data]
You'd have to insert the correct values for your server, of course:
server
is to be replaced with the hostname of your www-server,
site-info-root
is the location of the site-info script
directory on your server (probably /cgi-bin/site-info).
To update the index of files you would use this url:
http://www.yoyo.org/cgi-bin/site-info/index.pl?create
To get a report on the author "gonzo", you'd use:
http://www.yoyo.org/cgi-bin/site-info/report.pl?author?gonzo
Normally you don't have to call these functions by hand - everything you
need is assembled on the administration and index pages, so using the package
is as easy as selecting a hyperlink with your mouse.
If you'd like to experiment,though, you can find a list of all the
functions supported by a module at the beginning of its sourcecode.
References to functions in the text below will only contain the
function and (if necessary) additional parameters:
function[?data]
You'll have to substitute the leading part (server and site-info-root)
yourself.
perl install.pl
or you can alternatively edit the first line of install.pl to reflect the
location of perl on your site and run it as an executable.<return>
at the prompt.cgi-bin
. You should also put the index
scripts in a separate directory from the administration scripts (as suggested
by the default values) to easily set up document protection.
Problems:
The installation script guesses the location of programs on your system
by parsing the output of the "whereis"-command (the first executable
found in its output is taken as default). If you experience strange behaviour
you should find out which version of the program involved is the one
you actually use yourself with the which <program>
command.
Sun-Users should use the following instead of the defaults:
/usr/bin/install
/usr/bin/date
Exec /cgi-bin/site-info/* /home/webmaster/cern_httpd/cgi-bin/site-info/*You have to exchange the parameters with the places where you put the scripts, of course.
<!--tag: value>
noindex:
Exclude this file from the index
key:
Set keywords for this document
ititle:
Set alternative title used only for the index
author:
Set an author which can be different from the
physical owner (maintainer) of the file. The author can be defined as a
simple username (from the same machine) or a complex set containing his
email address, fullname and homepage in the following format:username*fullname*email*homepage
expires:
Set a date (either "YYMMDD" or "DD.MM.YY") for
expiry. The administrator can view a list of expired documents and take
appropriate action
index:
Include an index within the document. This tag is
used to automatically update your index pages. The exact syntax is:<!--index:
type*root!>
<!--/index!>
<!--index: a*/!>
<!--/index!>
<!--date!><!--/date!>
For the hierarchical index you can provide a "heading" for each directory
of your server. To do this, just create a file named .info
(with
a leading dot) in each directory, containing one line of text describing the
directory.
To exclude a complete directory from the index you can create an empty file
named .noindex
in that directory. To exclude a whole directory
tree, create a file names .notree
in the topmost directory
of that tree.
index.pl?palpha?dir
where dir is the topdirectory of
the tree of want to index. You can exchange alpha with hiera
or date for hierarchical or chronological indices (instead of
alphabetical).
During installation, a directory is created which contains the local
and external index files. Three index files (alphabetical, hierarchical
and chronological) reside in this directory which are automatically
updated everytime you update the index database (this is done using
the <!--index>
-tag described above). That way you
have a complete index of your server right from the start. Of course
you can edit the index files - only the index-lines within them will be
replaced during the next update. You can also create new index pages
with full or partial indices using the <!--index>
-tag.
author_passwd.html
page - he will have to identify
himself with his username and old password, though.
Transmitting data to a host:
To transmit data to another host you have to enter it into the host database,
along with the correct locations (Site-Info scripts and index homepage), and
give permission to send to it. You have to give yourself permission to send
index data in the authorbase. The receiving host has to create an entry for
you in the author database which allows you to receive index data on that
host.
Select the appropriate link from the administration page and identify yourself
with your local Site-Info username and password. Choose the host you want to
send to from the selection box (if it doesn't appear, you forgot to set the
send permission in the host database) and press the submit-button. A script
will prepare the data for sending and will present it as a set of four
textareas (using the forms-interface). It should be pretty obvious that you
should not edit the textareas. To actually send the data, identify yourself
with your Site-Info username and password from the host you want
to send to and press the submit button. If the action was successful, you
will receive a screen indicating the entries that were added to the remote hosts
database.
Receiving data from another host:
Receiving is analogous to sending. The sending host has to have your server
in its host database, along with the send permission set. You have to provide
an entry in the author database that is valid for receiving data on your host and
sending data on the other host. You can either send the data yourself from the
other host (if you are registered on that host), or let someone from the other host
send the data to you (as described above).
author_form.pl
in your Site-Info script directory takes its input as a query-string out of the
calling URL to generate a form. The user then types his name, email and comment
into the form and submits it, thus calling the author_mail.pl
script which
mails the comments to the appropriate author. You can only send mail to authors which
are registered in your author database this way.