Data Entry Pages

From ARK
Revision as of 17:15, 26 February 2009 by Guy (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The data entry page and sub pages follows the ark model. The page is more or less a place holder for forms which can be mixed and matched according to module being edited. This is keyed from the item_key.

The page itself is held at the top level directory:

data_entry.php

The scripts related to the page are held in:

php/data_entry/

Any global scripts needed are available in the root of php

php/

Any scripts specific to the module being edited would be held in the php mod folder appropriate for that module thus the scripts specific to the midule foo would be in:

php/mod_foo/

The parse order of the data entry pages is standard for all modules and forms. As much generic stuff as possible goes into the data_entry .php page and subforms are held in the data_entry folder. The subform would then include any module specific scripts including the 'update' script and the form.

The data entry page

This page is the top level skeleton xhtml document into which everything else fits key elements in parse order are:

  1. Set variables for the page
  2. Process script (if needed)
  3. Output Head
  4. Output Messages
  5. Include $plc
  6. Include $mlc

Registers

Following the ark model the global register page (global_regist.php) goes within the php/data_entry folder for sub forms of the data entry page.

The parts of the register that are specific to the module then go inside the module folder hence the context register is made up of:

 data_entry.php (the page)
 AND
 data_entry.php>>global_regist.php (page level content $plc)
 AND
 data_entry.php>>mod_cxt/regist.php (module level content $plc)

See page or module level content for a more detailed explanation of the model.

Detailed Forms

These forms also follow the Ark page>>plc>>mlc model. The detfrm.php script is the module level script and global_detfrm.php is the page level script.

The detfrm.php script aims to be as modular as possible, calling included sections of the form as required by the mod_XXX_settings.php file. This means that whole sections of the form can be turned on and off at will as well as allowing variable contents for each section.

Currently the sections appear as named <div> tags and so can be styled using CSS as set up in the skins.

A given section is turned on/off by the presence absence of an array in the settings file which is named $conf_XXX arrays where the XXX represents the name of the section. More detailed explanation on the use and set up of these arrays can be found the $conf_ arrays page.

The detfrm.php script is therefore largely a placeholder for the sections. These sections are held in the module folder using the naming convention:

 detfrm_XXX.php where XXX is the name of the section

Process Script

For obvious reasons, the process script is held in the module code folder and is specific to the view and the module.