UU.NL HOME cs.uu.nl

Local Pages, Indexing and Forms

Local Pages

Templates for UUCS www pages can be generated with the unix command mk_web_page.
See

% mk_web_page -help

for details.

General information about the UU huisstijl can be found in Solis huisstijl. The icons are in /users/www/icons/uu/ and can be referred to in web pages with /icons/uu/.
Icon /icons/uu/CS_home.gif (below) is an extra (thanks Hans Bodlaender).

Another possibility to get a template is to select one of the following links and save the page in HTML-format. Templates for external pages or internal pages are available.

Indexing

The index page for the UUCS Web server is generated daily. The page is clickable from the index-button at the footer of the documents. To add a document to the index page, the document author has to define metainformation in the HTML header section (the space between the <head> and </head> tags). The metainformation (implemented by the <META> tag) is valid HTML as defined in the HTML-specification.

The mk_web_page program has support for the <META> tag. Use the -keys option with one or more keywords (separated with comma's) as argument.

Consider this page as an example. To generate the HTML template for this page, the following command was executed:

	% mk_web_page -title "Templates and Indexing" \
		      -keys "Templates,Indexing" > page.html
All the HTML-code before the upper horizontal line and below the lower horizontal line is generated by the program. Here's an example of the header section:
        <html>
        <head><title>Templates and Indexing</title>
        <META NAME="Keywords" CONTENT="Templates,Indexing">
        </head>
        <body>
If you select the index-button at the lower section of this page, you could see the two entries Templates and Indexing. Of course you can add the <META> tag by hand if you don't want to use the mk_web_page program.

If you want to supply some keywords, but you don't want your file to appear in the index, add the keyword

  do-not-index
to your list of keywords.

Forms

It is easy to define a form and have the contents supplied by a user mailed to you. Include a form definition in your www page:
  <FORM METHOD=POST
        ACTION="/cgi-bin/mail-form/user@cs.uu.nl/subject">
  ....
  </FORM>
where user is a valid user or sendmail alias and subject is the url-encoded subject of the message to be sent. You have url-encoded the subject if you only use letters and digits, and type '+' instead of <SPACE>. For example Result+of+my+Form.

The mail you receive looks like a list of key/value-pairs:

  Date: Wed, 26 Aug 1998 09:05:01 +0200 (MET DST)
  From: webmaster@cs.uu.nl
  To: user@cs.uu.nl
  Subject: subject
  Sender: www@sherlock.cs.uu.nl

  comments=first line
  realname=My Name
  username=me@my.domain
However, the values are just what the user typed in, so values (from TEXTAREAS's) may contain for instance newlines which makes parsing of the mail message difficult. Decoding of user data can be suppressed by including a hidden field ENCODE in your form.
  <INPUT TYPE="hidden" NAME="ENCODE" VALUE="1">
Nonprintable ascii is now url-encoded and may decoded in a perlscript with the magic incantation:
  $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg ;
If a hidden field ENCODE is used, the first line of your mail will be:
  ENCODE=value
depending on the value of the hidden field ENCODE, so your script can easily determine the proper decoding.

When you use the hidden field TOHTML, the result page will show the full content of the mail that is sent.

  <INPUT TYPE="hidden" NAME="TOHTML" VALUE="1">

The script mail-form replaces all other scripts mailing form output to users.


UU CS INFO FIND INDEX
webmaster@cs.uu.nl, Mon Mar 1 7:49:22 MET 2004