File/program/manual.php

Description

/program/manual.php - a kickstarter for the documentation

This script is an entry point; it can be called directly. It is also linked to from /program/admin.php, via the help button, implementing a context-sensitive help function. The following parameters are recognised:

  • language: a language key, e.g. 'nl' (Dutch) or 'es' (Spanish). Default is 'en' (English)
  • topic: one of the recognised topics, e.g. 'tools' or 'pagemanager'. Default is 'toc' (Table of contents)
  • subtopic: one of the subtopics relevant in this topic, e.g. 'license' in the 'install' topic. Default is '' (None).
The actual work is done in the function show_manual() below.

Functions
get_available_manuals (line 235)

construct a list of 0 or more languages of available manuals

This routine examines the directory $path to see which subdirectories exist. Each subdirectory indicates a possible language. An array keyed with these languages and the full path to the directory containing the manual's index.html is returned (but it could be empty).

  • return: contains a list of available manual directories keyed by language_key
array get_available_manuals (string $path)
  • string $path: is the directory where to look for manuals (usually /program/manuals).
show_manual (line 109)

redirect the user to a specific place in the manual OR show helpful message about downloading the manual

There is a Website@School Users' Guide available, in English. This is a separate download from the project's website. That means that it is optional to have the (English) manual installed. If it is installed, it is installed under /program/manuals/en/. There might also be translations available, say the Dutch version of the manual. That one would be installed in /program/manuals/nl/ which allows for peaceful co-existence of multiple translations of the manual. This script manual.php is designed to:

  • redirect the user to the correct translation of the manual (if installed), and
  • possibly use deep links to create context-sensitive help.
If the manual is not available in the requested language, the user is redirected to the English version (if that one IS installed). If no manual is installed at all, the user is shown a simple HTML-page which provides a link to the location where the manual(s) can be downloaded.

  • return: this function never returns
void show_manual ([string $language = 'en'], [string $topic = 'toc'], [string $subtopic = ''])
  • string $language: indicates the desired manual language
  • string $topic: is the topic of interest to which we deep link
  • string $subtopic: is a subtopic to allow for an even deeper link

Documentation generated on Wed, 11 May 2011 23:45:27 +0200 by phpDocumentor 1.4.0