Templates for the new web server

If you created your own web pages from scratch, rather than downloading and adapting the templates from this page, you can ignore the instructions below.

If you used either our PHP template, or our pagetree system for creating entire sites with navbars, then read on.

You will have to copy all your web pages to the new web server when it is installed. As you do so, you will also need to convert all your PHP scripts to PHP 4.3, which is used on the new web server. PHP 4 is a great advance over PHP 3, and mostly compatible, but you will have to take care of a few small things. This is documented on the PHP website.

In addition, you should be aware that the new web server will interpret a file as containing PHP code iff it has the ending .php. This means you will have to rename all your ".phtml" and ".php3" files.

Templates for single pages

We provide a template to create a web page in the general look and feel of the Coli web pages. This template is available in two versions: one is pure HTML which just happens to look exactly the same as the global pages; the other uses some PHP to make sure that changes in the global page headers are propagated immediately to your page.

  1. the pure HTML file (which now has some new links) (see it in action)
  2. the PHP script that imports the global page header (see it in action)
If you are migrating existing pages based on these templates to the new webserver, download the new templates above and paste in your changes, like you did when you first adjusted the templates on the old web server.

We also used to offer a version of the templates that used PHP just to select a CSS style sheet for Netscape or Internet Explorer. This seems like overkill now, so we no longer support these templates.

Migration of "pagetree" web sites

If you are setting up a complex web site, you might be interested in using the "pagetree" system that we use for the global Coli website. This system will allow you to specify the structure of your website in a configuration file, and then compute a navbar for you automatically.

If you have already been using "pagetree", you will have to take the following steps to migrate your site to the new web server:

  1. Convert your "pagetree" file to the new XML format by running this script. Save the result into the file "pagetree.xml".
  2. Inspect the file pagetree.xml and decide if you want to use the new features: You can specify the root URL of your site by setting the attribute "docroot" in the "pagetree" element, and you can specify a title for the entire site by setting the "title" attribute in the "pagetree" element.
  3. Delete the file colipage.phtml and all symbolic links that point to it.
  4. Copy or link the file /web/www.coli.uni-saarland.de/html/page.php on httpd into your pagetree directory.
  5. Done!
Note that you need to access your pages under different URLs now. A page that used to be called "something.phtml" before is now called "page.php?id=something". The navbar of course points to the new URLs, but you need to adjust external links.

Creating new "pagetree" web sites

If you want to use the opportunity of having to recreate your website anyway to migrate it to the pagetree system, here's how.

The pagetree system consists of three parts:

  1. The file "pagetree.xml", which defines the structure of your site.
  2. HTML files in a subdirectory "contents", one for each page of your site, which contain the actual contents of your site.
  3. The file "page.php", which reads pagetree, computes the navbar, and displays the content for the selected page.
The easiest way to learn how to use the system is probably by looking at the file for the global Coli site. Notice that the whole site is divided into sections, each of which can contain any number of entries. Each entry has a unique ID and either a title or a URL. If an entry with ID "foo" has a title, it will display the page with the contents of "contents/foo.html". If an entry contains a URL, this URL is taken as a reference to an external website.

In order to set up your new pagetree site, do the following:

  1. Copy or link the file /web/www.coli.uni-saarland.de/html/page.php on httpd into the directory for your website.
  2. Create a file "pagetree.xml" in that directory. The file must have a pagetree element that contains a section with an entry. It doesn't need a frontpage element.
  3. Create a subdirectory "contents" and place a file "foo.html" into it for each ID "foo" that you're using for an entry that doesn't refer to an external URL.
  4. Access a page with the URL "http://..../page.php?id=foo".

If you do not pass an ID to page.php, it defaults to "index".

The entries and sections of a pagetree.xml file can have additional attributes that are read as flags (i.e. you write <entry id=etc. etc. flag="true" />). Some useful flags are:

The top-level "pagetree" element can also have attributes: