Page settings.php
Include Server Settings
And include the settings related to your server environment contained within the env_settings.php:
// Include settings related to your server environment include('env_settings.php');
Unless listed in this array, all pages will appear in the main nav.
$conf_hide_pages = array( 'index.php', 'record_view.php', 'contact.php', 'about.php', 'search.php', 'folder.php', 'overlay_holder.php', 'export.php', 'alias_admin.php', 'markup_admin.php', 'import.php' );
Configure to state what links will appear in the end of the navigation bar.
$conf_linklist = array( 'file' => 'index.php', 'vars' => 'logout=true', 'label' => 'logout' );
Left Panel Configuration
As of v0.8 there are two configuration options (Option 1: Link list or Option 2: Subform) which may be used to provide users with links in the left panel. The left panel now follows the subform-linklist options for all views including the user home, data entry and micro view (record view) left panels- not including the search-data view). Both options require the option to be defined first, i.e. $delpoutput = 'subforms'; OR $delpoutput = 'linklist'; (this example is for data entry). It should be noted that if this is not set, the left panel sets this to 'linklist' by default.
Option 1 - Link list
This is a simple list of links that will be formatted and outputted into the left panel, and has been the default mechanism for configuring links in the left panel to date. This usually requires administrators to configure individual links for registers and detailed forms (view). Each link requires the following:
- href - link to the output
- mknname - mark-up nickname will search the markup table for this nickname and print the markup
- img - link to an image used
within the 'href' the following vars need to be set up (see example below):
- view - the view the link should point to (regist, detfrm, files or a custom view)
- item_key - itemkey to point to if any (cxt_cd, smp_cd)
Option 2 - Subform
As of v0.8 subforms can be executed within the left panel. This opens the door for a range of custom subforms to be written providing useful user interface features. This also permits us to use conditional behaviours for the panel.
In order to set this up correctly, you need to set up a subform and place it within a column as you would in data entry or micro view. In order to use the sf_linklist (as in the above example) create a link list array according to the criteria for option 1 (see above) and then put this into the 'fields' element of the subform instead of an array of fields. This is documented within the page for this subform as this is now a behaviour specific to this subform. The example below also uses the sf_module to define the modules to display in the left panel, which gives the option of inserting icons for the detailed forms and registers if they are configured in the mod_settings.
User Home
These settings control the subforms and left panel in the user home. The user home needs configuration both for the left panel and for the subforms included in the main area.
User Home Left Panel
Configures the left panel in the user home pages, requires the administrator to configure the lpanel with either Option 1 (linklists) or Option 2 (subforms). Requires the $uhlpoutput to be set, and when using the subform option requires the 'ark_page' to be set to 'user_home' in the sf_module.
Subforms Option Example
Define the configuration type:
$uhlpoutput = 'subforms';
Configure the subform:
$uhlp_subform_module = array( 'view_state' => 'max', 'edit_state' => 'view', 'sf_nav_type' => 'none', 'sf_title' => 'mvlpmodlist', 'sf_html_id' => 'mvlpmodlist', // Must be unique 'script' => 'php/subforms/sf_module.php', 'ark_page'=> 'user_home', 'fields' => array ( 'cxt', 'smp', 'spf', 'sph' ) );
Load the subform:
$user_home_left_panel = array( 'col_id' => 'mvlp', 'col_alias' => FALSE, 'col_type' => 'primary_col', 'subforms' => array( $uhlp_subform_module ) );
Data Entry
These settings configure the data entry page. The data entry requires configuration for both the left panel and the record navigation bar appearing at the top of the main area. Further options for advanced file upload are also included below.
Data Entry Left Panel
This section gives examples for the left panel configuration in the data entry pages.
Link list Option Example
Define the configuration type:
$delpoutput = 'linklist';
Configure the links:
$data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=cxt_cd", 'mknname' => 'regcxt' ); $data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=detfrm&item_key=cxt_cd", 'mknname' => 'detcxt' ); $data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=pln_cd", 'mknname' => 'regpln' ); $data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=sph_cd", 'mknname' => 'regsph' ); $data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=abk_cd", 'mknname' => 'regabk' ); $data_entry_left_panel[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=files", 'mknname' => 'uplfile' );
Subforms Option Example
Define the configuration type:
$delpoutput = 'subforms';
Configure the linklist (in this case, a linklist is being used to display the upload files link and the sf_linklist is calling the link):
$link_list_admin[] = array( 'href' => "{$_SERVER['PHP_SELF']}?view=files", 'mknname' => 'uplfile', 'img' => 'bigplus.png' );
Configure the subforms - Subform listing the modules:
$delp_subform_module = array( 'view_state' => 'max', 'edit_state' => 'view', 'sf_nav_type' => 'none', 'sf_title' => 'delpmodlist', 'sf_html_id' => 'delpmodlist', // Must be unique 'script' => 'php/subforms/sf_module.php', 'ark_page'=> 'data_entry', 'fields' => array ( 'cxt', 'smp', 'spf', 'sph', ) );
Admin Subform calling the file upload linklist from above:
$delp_subform_admin = array( 'view_state' => 'max', 'edit_state' => 'view', 'sf_nav_type' => 'none', 'sf_title' => 'delpadmin', 'sf_html_id' => 'delpadmin', // Must be unique 'script' => 'php/subforms/sf_linklist.php', 'op_label' => 'space', 'op_input' => 'save', 'op_linktype' => 'icon', 'op_sf_cssclass' => 'module_list', 'op_modtype' => FALSE, //if each modtype uses same fields (see below) 'fields' => $link_list_admin );
Load the subforms:
$data_entry_left_panel = array( 'col_id' => 'delp', 'col_alias' => FALSE, 'col_type' => 'primary_col', 'subforms' => array( $delp_subform_module, $delp_subform_admin ) );
Record Toolbar
Configure the tools for the record view toolbar. This tool bar controls what navigation and options which appear in data entry record toolbar.
First form the individual buttons and displays:
// Previous record $group_nav[] = array( 'name' => 'prev', 'type' => 'text', 'href' => "", 'css_class' => FALSE, 'mkname' => 'prev', 'lightbox' => FALSE ); // Displays current site code $group_nav[] = array( 'name' => 'ste_cd', 'type' => 'text', 'href' => "", 'css_class' => FALSE, 'mkname' => 'ste_cd', 'lightbox' => FALSE ); // Displays current record number $group_nav[] = array( 'name' => 'current', 'type' => 'text', 'href' => "", 'css_class' => FALSE, 'mkname' => 'current', 'lightbox' => FALSE ); // Displays current modtype $group_nav[] = array( 'name' => 'modtype', 'type' => 'text', 'href' => "", 'css_class' => FALSE, 'mkname' => 'modtype', 'lightbox' => FALSE ); // Next record $group_nav[] = array( 'name' => 'next', 'type' => 'text', 'href' => "", 'css_class' => FALSE, 'mkname' => 'next', 'lightbox' => FALSE );
Refresh View
// Refresh button $group_refresh[] = array( 'name' => 'refresh', 'type' => 'img', 'href' => "{$_SERVER['PHP_SELF']}?disp_reset=default", 'css_class' => 'refresh', 'mkname' => 'reset', 'lightbox' => FALSE );
Administrator Tools
// ADMIN TOOLS // Delete record $group_admin[] = array( 'name' => 'delete', 'type' => 'img', 'href' => FALSE, 'css_class' => 'delimg', 'mkname' => 'del', 'lightbox' => 'lightbox|200' ); // Edit modtype $group_admin[] = array( 'name' => 'changemod', 'type' => 'text', 'href' => FALSE, 'css_class' => 'recedit', 'mkname' => 'chgtype', 'lightbox' => 'lightbox|200' ); // Edit record number $group_admin[] = array( 'name' => 'changeval', 'type' => 'text', 'href' => FALSE, 'css_class' => 'recedit', 'mkname' => 'chgkey', 'lightbox' => 'lightbox|200' );
And then put them in the toolbar conf array:
// Package these button groups up into a toolbar $conf_record_nav = array( 'record_nav' => $group_nav, 'record_refresh' => $group_refresh, 'record_admin' => $group_admin, );
Advanced File Upload
The following includes instructions on how to configure the advanced file uploader which was developed as a mechanism for not only batch uploading files, but also registering and/or linking them to existing records on the fly.
- on - Set to TRUE, advanced file uploader dialog is displayed.
- pattern - This is a regex (Regular expression) designed to detect the file names and associate the files with the appropriate records (item_keys). These example expressions are set up to treat the first 3 letters of a file name as the relevant site code and the numbers following as the number. (For example: 'pattern' => "/\b[a-zA-Z]*\-(([0-9]*)|(([0-9]*)-[a-zA-Z0-9]*))\.[a-zA-Z]{2,4}\b/i" handles files xxx-1234.jpg, xxx-1234-yyy.jpg, where xxx can be any letter and yyy any alphanumeric combination, only number before first '-' is used as an ID)
$fu = array( 'on' => TRUE, 'pattern' => "/\b[a-zA-Z]*\-(([0-9]*)|(([0-9]*)-[a-z0-9A-Z]*))\.[a-z0-9]{2,4}\b/i", // 'pattern' => "/\bMUS-([0-9]*)\.[a-z0-9]{2,4}\b/i", );