Chapter 10. Adaption

Table of Contents

General layout of source
Program flow
Modifying forms
Adding new forms
Writing a Wizards
Form file syntax
Wizard file syntax
Modifying behaviour
menu.xml - adding new menu items
Menu JSON format
Useful functions
metadata.php
2lib/selecthelp.php
2lib/template.php
share/updatehelp.php
share/deletehelp.php
share/formhelp.php
share/fieldhandlersclass.php
share/graphlib.php
Other possible adaptations
validateclass... And postprocessclass...
heartbeat_ and info_
General idea of adaptability
tables.struct
tablename.frm
<querytemplate>
<list>
<when>
<field>
<form>
<llist>
wizard.xml
<row>

The system is built to be easily extended by writing new code. There are some skills required for the easy part to hold true. You have to know HTML, PHP, and MySQL.

The recommended way to do this for location adaptations is to use the local subdirectory. Any modification done there will survive an upgrade of the system with no or minor modifications.

This section has hints and tips on how to do things as well as what functions and classes are available to use. Some are optional, some have to be used for the system to work properly.

General layout of source

There are four main directories used. 2lib/, share/, twospot/ and local/. 2lib and share contains mostly library functions. twospot is the main application and local/ can contain local adaptations of the programs behaviour. r/ contains ajax response code.