Difference between revisions of "Page settings.php"

From ARK
Jump to: navigation, search
(Data View Left Panel)
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Include Server Settings==
+
As of v1.0, all settings related to individual page displays, navigation, and toolbars are to be included in the [[page_settings.php]].
And include the settings related to your server environment contained within the [[env_settings.php]]:
 
<pre>
 
// Include settings related to your server environment
 
include('env_settings.php');
 
</pre>
 
 
==Navigation==
 
==Navigation==
 
===Navigation Pages===
 
===Navigation Pages===
Unless listed in this array, all pages will appear in the main nav.
+
As of v1.1 $conf_hide_pages has been replaced with $conf_pages. All pages listed in this array will appear in the main nav. Overlay holder, download, feed, and transclude object are required pages with their visibility setting set to FALSE so they do not appear in the navigation. As of v1.1, each page also requires its own settings array, as detailed under each page heading below.
 
<pre>
 
<pre>
$conf_hide_pages =
+
$conf_pages =
 
     array(
 
     array(
         'index.php',
+
         'user_home',
         'record_view.php',
+
        'data_entry',
         'contact.php',
+
        'micro_view',
         'about.php',
+
        'data_view',
         'search.php',
+
         'user_admin',
         'folder.php',
+
         'alias_admin',
         'overlay_holder.php',
+
         'markup_admin',
         'export.php',
+
         'import',
         'alias_admin.php',
+
         'resultsmicro_view',
         'markup_admin.php',
+
         'index',
         'import.php'
+
         'overlay_holder',
 +
         'download',
 +
         'feed',
 +
         'transclude_object'
 
);
 
);
 
</pre>
 
</pre>
 +
 
===Navigation Links===
 
===Navigation Links===
 
Configure to state what links will appear in the end of the navigation bar.
 
Configure to state what links will appear in the end of the navigation bar.
Line 34: Line 33:
 
);
 
);
 
</pre>
 
</pre>
==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.
 
 
[[Image:lpanel_linklist.png|right|frame|Example of left panel in data entry configured with linklist]]
 
===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)
 
 
[[Image:lpanel_subforms.png|right|frame|Example of left panel in data entry configured with subforms (sf_module and sf_linklist)]]
 
=== 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 [[sf_linklist| 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==
 
==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.
 
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 Page Settings===
 +
As of v1.1 an individual page setting array is required for each page directing the ARK to the code directory and navigation settings for that particular page.
 +
<pre>
 +
// PAGE SETTINGS
 +
$conf_page_user_home =
 +
    array(
 +
        'name' => 'User Home',
 +
        'title' => 'User Home Page',
 +
        'file' => 'user_home.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'homenav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/user_home/',
 +
        'is_visible' => TRUE
 +
);
 +
</pre>
 
===User Home Left Panel===
 
===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]].
+
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) as defined in the [[left_panel]] documentation. 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====
 
====Subforms Option Example====
 
Define the configuration type:
 
Define the configuration type:
Line 95: Line 90:
 
);
 
);
 
</pre>
 
</pre>
 +
 
== Data Entry ==
 
== 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.
 
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 Page Settings===
 +
<pre>
 +
// PAGE SETTINGS
 +
$conf_page_data_entry =
 +
    array(
 +
        'name' =>'Data Entry',
 +
        'title' => 'Data Entry Page',
 +
        'file' => 'data_entry.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'dataentrynav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/data_entry/',
 +
        'is_visible' => TRUE
 +
);
 +
</pre>
 
=== Data Entry Left Panel ===
 
=== Data Entry Left Panel ===
This section gives examples for the left panel configuration in the data entry pages.  
+
This section gives examples for the left panel configuration in the data entry pages using either Option 1 (linklists) or Option 2 (subforms) as defined in the [[left_panel]] documentation.  
 +
==== Minimiser Option ====
 +
This tool condenses subforms and offers quick navigation in left panel. To use the minimiser on specific data entry pages you need to go to the mod_settings files (ex. mod_cxt_settings.php) and make sure that 'col_type' => 'collaps_col', instead of single_col in the $conf_dat_materi and $conf_dat_detfrm settings.
 +
<pre>
 +
$minimiser = TRUE;
 +
</pre>
  
 
====Link list Option Example====
 
====Link list Option Example====
Line 208: Line 224:
 
);
 
);
 
</pre>
 
</pre>
===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.
 
  
==== Record Navigation ====
+
=== Data Entry Toolbar ===
First form the individual buttons and displays:
+
Configure the tools for data entry. First form the individual buttons and displays:
 +
==== User Navigation ====
 
<pre>
 
<pre>
// Previous record
+
// Previous record button
$group_nav[] =
+
$group_entry_nav[] =
 
     array(
 
     array(
'name' => 'prev',
+
'name' => 'prev',
 
         'type' => 'text',
 
         'type' => 'text',
 
         'href' => "",
 
         'href' => "",
Line 224: Line 239:
 
         'lightbox' => FALSE
 
         'lightbox' => FALSE
 
);
 
);
// Displays current site code
+
// Displays site code
$group_nav[] =
+
$group_entry_nav[] =
 
     array(
 
     array(
 
'name' => 'ste_cd',
 
'name' => 'ste_cd',
Line 234: Line 249:
 
         'lightbox' => FALSE
 
         'lightbox' => FALSE
 
);
 
);
// Displays current record number
+
// Displays record number
$group_nav[] =
+
$group_entry_nav[] =
 
     array(
 
     array(
 
'name' => 'current',
 
'name' => 'current',
Line 244: Line 259:
 
         'lightbox' => FALSE
 
         'lightbox' => FALSE
 
);
 
);
// Displays current modtype
+
// Displays module type
$group_nav[] =
+
$group_entry_nav[] =
 
     array(
 
     array(
 
'name' => 'modtype',
 
'name' => 'modtype',
Line 254: Line 269:
 
         'lightbox' => FALSE
 
         'lightbox' => FALSE
 
);
 
);
// Next record
+
// Next record button
$group_nav[] =
+
$group_entry_nav[] =
 
     array(
 
     array(
 
'name' => 'next',
 
'name' => 'next',
Line 266: Line 281:
 
</pre>
 
</pre>
  
==== Refresh View ====
+
==== Administrator tools ====
 
<pre>
 
<pre>
// Refresh button
 
$group_refresh[] =
 
    array(
 
'name' => 'refresh',
 
        'type' => 'img',
 
        'href' => "{$_SERVER['PHP_SELF']}?disp_reset=default",
 
        'css_class' => 'refresh',
 
        'mkname' => 'reset',
 
        'lightbox' => FALSE
 
);
 
</pre>
 
 
==== Administrator Tools ====
 
<pre>
 
// ADMIN TOOLS
 
 
// Delete record
 
// Delete record
$group_admin[] =
+
$group_entry_admin[] =
 
     array(
 
     array(
 
         'name' => 'delete',
 
         'name' => 'delete',
 
         'type' => 'img',
 
         'type' => 'img',
'href' => FALSE,
+
        'href' => FALSE,
 
         'css_class' => 'delimg',
 
         'css_class' => 'delimg',
 
         'mkname' => 'del',
 
         'mkname' => 'del',
 
         'lightbox' => 'lightbox|200'
 
         'lightbox' => 'lightbox|200'
 
);
 
);
// Edit modtype
+
// Edit module type
$group_admin[] =
+
$group_entry_admin[] =
 
     array(
 
     array(
 
'name' => 'changemod',
 
'name' => 'changemod',
Line 300: Line 300:
 
'href' => FALSE,
 
'href' => FALSE,
 
         'css_class' => 'recedit',
 
         'css_class' => 'recedit',
         'mkname' => 'chgtype',
+
         'mkname' => 'chngmod',
 
         'lightbox' => 'lightbox|200'
 
         'lightbox' => 'lightbox|200'
 
);
 
);
 
// Edit record number
 
// Edit record number
$group_admin[] =
+
$group_entry_admin[] =
 
     array(
 
     array(
 
'name' => 'changeval',
 
'name' => 'changeval',
Line 310: Line 310:
 
'href' => FALSE,
 
'href' => FALSE,
 
         'css_class' => 'recedit',
 
         'css_class' => 'recedit',
         'mkname' => 'chgkey',
+
         'mkname' => 'DEL',
 
         'lightbox' => 'lightbox|200'
 
         'lightbox' => 'lightbox|200'
 
);
 
);
Line 318: Line 318:
 
<pre>
 
<pre>
 
// Package these button groups up into a toolbar
 
// Package these button groups up into a toolbar
$conf_record_nav =
+
$conf_entry_nav =
 
     array(
 
     array(
    'record_nav' => $group_nav,
+
'record_nav' => $group_entry_nav,
        'record_refresh' => $group_refresh,
+
         'record_admin' => $group_entry_admin,
         'record_admin' => $group_admin,
 
 
);
 
);
 
</pre>
 
</pre>
 +
 
===Advanced File Upload===
 
===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.
 
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.
Line 336: Line 336:
 
);
 
);
 
</pre>
 
</pre>
 +
 
==Data View (Search)==
 
==Data View (Search)==
 
These settings configure the data view (or search) page. The data view requires configuration for the left panel, the search tools options (results views, download options, etc) as well as some general settings for search results.
 
These settings configure the data view (or search) page. The data view requires configuration for the left panel, the search tools options (results views, download options, etc) as well as some general settings for search results.
Line 363: Line 364:
 
// Default $output_mode for the data viewer
 
// Default $output_mode for the data viewer
 
$default_output_mode = 'table';
 
$default_output_mode = 'table';
 +
</pre>
 +
===Data View Page Settings===
 +
<pre>
 +
// PAGE SETTINGS
 +
$conf_page_data_view =
 +
    array(
 +
        'name' =>'Search',
 +
        'title' => 'Search Page',
 +
        'file' => 'data_view.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'searchnav',
 +
        'navlinkvars' => '?view=standard',
 +
        'cur_code_dir' => 'php/data_view/',
 +
        'is_visible' => TRUE
 +
);
 
</pre>
 
</pre>
 
===Data View Left Panel===
 
===Data View Left Panel===
 
This configures the left panel for the data view pages through a series of complex subforms including [[sf_linklist]], [[sf_buildfilter]], and [[sf_mysavedstuff]].
 
This configures the left panel for the data view pages through a series of complex subforms including [[sf_linklist]], [[sf_buildfilter]], and [[sf_mysavedstuff]].
 
+
====Configure the linklist====
 
First configure the linklist, which requires the following:
 
First configure the linklist, which requires the following:
*'''href''' - link to the output ({$_SERVER['PHP_SELF']} is on same page, and then links to the key ID in cor_tbl_module of the designated data filter
+
*'''href''' - link to the output ({$_SERVER['PHP_SELF']} is on same page, and then links to the key ID in the relevant cor table of the designated data filter
 
*'''mknname''' - mark-up nickname will search the markup table for this nickname and print the markup
 
*'''mknname''' - mark-up nickname will search the markup table for this nickname and print the markup
 
*'''img''' - optional image for the icon defined in the subform linklist:
 
*'''img''' - optional image for the icon defined in the subform linklist:
Line 374: Line 390:
 
$link_list_filters[] =  
 
$link_list_filters[] =  
 
array(
 
array(
'href' => "{$_SERVER['PHP_SELF']}?vtok=1&ftype=key&key=1",  
+
'href' => "{$_SERVER['PHP_SELF']}?ftype=key&amp;key=1&amp;ftr_id=new",  
 
'mknname' => 'filtercxt',
 
'mknname' => 'filtercxt',
 
'img' => 'view_mag.png'
 
'img' => 'view_mag.png'
Line 380: Line 396:
 
$link_list_filters[] =  
 
$link_list_filters[] =  
 
array(
 
array(
         'href' => "{$_SERVER['PHP_SELF']}?vtok=1&ftype=key&key=6",  
+
         'href' => "{$_SERVER['PHP_SELF']}?ftype=key&amp;key=6&amp;ftr_id=new",  
 
         'mknname' => 'filtersmp',
 
         'mknname' => 'filtersmp',
 
         'img' => 'view_mag.png'
 
         'img' => 'view_mag.png'
Line 386: Line 402:
 
$link_list_filters[] =  
 
$link_list_filters[] =  
 
array(
 
array(
'href' => "{$_SERVER['PHP_SELF']}?vtok=1&ftype=stecd",  
+
'href' => "{$_SERVER['PHP_SELF']}?ftype=stecd&amp;ftr_id=new",  
 
         'mknname' => 'filterstecd',
 
         'mknname' => 'filterstecd',
 
         'img' => 'view_mag.png'
 
         'img' => 'view_mag.png'
Line 392: Line 408:
 
$link_list_filters[] =  
 
$link_list_filters[] =  
 
array(
 
array(
'href' => "{$_SERVER['PHP_SELF']}?vtok=1&ftype=action",  
+
'href' => "{$_SERVER['PHP_SELF']}?ftype=action&amp;ftr_id=new",  
 
         'mknname' => 'filteractor',
 
         'mknname' => 'filteractor',
 
         'img' => 'view_mag.png'
 
         'img' => 'view_mag.png'
Line 398: Line 414:
 
$link_list_filters[] =  
 
$link_list_filters[] =  
 
array(
 
array(
'href' => "{$_SERVER['PHP_SELF']}?vtok=1&ftype=ftx",  
+
'href' => "{$_SERVER['PHP_SELF']}?ftype=ftx&amp;ftr_id=new",  
 
         'mknname' => 'ftx',
 
         'mknname' => 'ftx',
 
         'img' => 'view_mag.png'
 
         'img' => 'view_mag.png'
Line 421: Line 437:
 
);
 
);
 
</pre>
 
</pre>
 +
 +
====Filter Builders====
 +
Various options exist for the types of filters administrators will want to make available to users- including different stages of pre-built or partially executed filters. For more information on this subform and options see [[sf_buildfilter]].
 +
<br>
 
Subform for the filter builder to run in the left panel:
 
Subform for the filter builder to run in the left panel:
 
<pre>
 
<pre>
Line 441: Line 461:
 
             ),  
 
             ),  
 
         ),
 
         ),
);
 
</pre>
 
Subform for the filter builder in an overlay (no condition):
 
<pre>
 
$dvlp_overlay_filter_builder =
 
    array(
 
        'view_state' => 'min',
 
        'edit_state' => 'view',
 
        'sf_nav_type' => 'none',
 
        'sf_title' => 'dvlp_filters',
 
        'sf_html_id' => 'dvlp_filter_builder', // Must be unique
 
        'script' => 'php/data_view/subforms/sf_buildfilter.php',
 
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
 
        // Does the linklist use an icon instead of a label as link
 
        'op_sf_cssclass' => 'ftr_subform',
 
 
);
 
);
 
</pre>
 
</pre>
Line 477: Line 482:
 
                 'atrtype' => 1,
 
                 'atrtype' => 1,
 
                 'op_display' => 'dd'
 
                 'op_display' => 'dd'
        )
 
        // 'op_condition' =>
 
        //    array(
 
        //        array(
 
        //            'func'=> 'chkTmpFtr',
 
        //            'args'=> FALSE
 
        //    ),
 
        // ),
 
);
 
</pre>
 
Subform for the filter builder to run preloaded with an attribute filter:
 
<pre>
 
$dvlp_filter_builder_atr_preload =
 
    array(
 
        'view_state' => 'min',
 
        'edit_state' => 'view',
 
        'sf_nav_type' => 'none',
 
        'sf_title' => 'dvlp_filters',
 
        'sf_html_id' => 'dvlp_filters', // Must be unique
 
        'script' => 'php/data_view/subforms/sf_buildfilter.php',
 
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
 
        // Does the linklist use an icon instead of a label as link
 
        'op_sf_cssclass' => 'ftr_subform',
 
        'op_filter' => 'atr', // the filter to be used
 
        'op_filter_args' => // the argument(s) to be preloaded (optional)
 
            array(
 
                'atrtype' => 1
 
 
         )
 
         )
 
);
 
);
 +
 
</pre>
 
</pre>
 
Subform for user saved filters
 
Subform for user saved filters
Line 519: Line 498:
 
         'op_modtype' => FALSE, //if each modtype uses same fields (see below)
 
         'op_modtype' => FALSE, //if each modtype uses same fields (see below)
 
         'op_sf_cssclass' => 'ftr_subform',
 
         'op_sf_cssclass' => 'ftr_subform',
        // 'op_condition' =>
 
        //    array(
 
        //        array(
 
        //            'func'=> 'chkTmpFtr',
 
        //            'args'=> FALSE
 
        //    ),
 
        // ),
 
 
);
 
);
 
</pre>
 
</pre>
Line 542: Line 514:
 
                 $dvlp_my_saved_filters
 
                 $dvlp_my_saved_filters
 
         )
 
         )
 +
);
 +
</pre>
 +
 +
===Results Toolbar===
 +
Configure the tools and display options for the search page (data_view).  All of the toolbars require the following in the array:
 +
*'''type''' - Options of 'img', 'text', or 'newpage' (used in the all record view to display function in a new page)
 +
*'''href''' - The href link to the function being called
 +
*'''css_class''' - The css class to style the button or display
 +
*'''mkname''' - The name of markup contained within cor_tbl_markup used for buttons which combine text and images, are just text based. Set to FALSE if not used.
 +
*'''lightbox''' - Option of using the lightbox when calling an overlay form, set to FALSE otherwise
 +
 +
First form the individual buttons:
 +
 +
==== Tools ====
 +
<pre>
 +
// TOOLS
 +
$group_tools[] =
 +
    array(
 +
        'type' => 'img',
 +
        'href' => "overlay_holder.php?sf_conf=conf_mac_userconfigfields&amp;lboxreload=1",
 +
        'css_class' => 'gears',
 +
        'mkname' => FALSE,
 +
        'lightbox' => 'lightbox'
 +
);
 +
</pre>
 +
 +
==== Displays ====
 +
<pre>
 +
// DISPs
 +
$res = "results_mode=disp";
 +
// Text view
 +
$group_disp[] =
 +
    array(
 +
        'type' => 'img',
 +
        'href' => "{$_SERVER['PHP_SELF']}?$res&amp;disp_mode=text",
 +
        'css_class' => 'text',
 +
        'mkname' => FALSE,
 +
        'lightbox' => FALSE
 +
);
 +
// Table view
 +
$group_disp[] =
 +
    array(
 +
        'type' => 'img',
 +
        'href' => "{$_SERVER['PHP_SELF']}?$res&amp;disp_mode=table",
 +
        'css_class' => 'table',
 +
        'mkname' => FALSE,
 +
        'lightbox' => FALSE
 +
);
 +
// Map view
 +
$group_disp[] =
 +
    array(
 +
        'type' => 'img',
 +
        'href' => "{$_SERVER['PHP_SELF']}?$res&amp;disp_mode=map",
 +
        'css_class' => 'map',
 +
        'mkname' => FALSE,
 +
        'lightbox' => FALSE
 +
);
 +
// All record view
 +
$group_disp[] =
 +
    array(
 +
        'type' => 'newpage',
 +
        'href' => "resultsmicro_view.php?",
 +
        'css_class' => 'printall',
 +
        'mkname' => FALSE,
 +
        'lightbox' => FALSE
 +
);   
 +
</pre>
 +
 +
==== Feeds ====
 +
<pre>
 +
// FEEDS
 +
$res = "results_mode=feed";
 +
// RSS feed
 +
$group_feeds[] =
 +
    array(
 +
        'type' => 'text',
 +
        'href' => "{$_SERVER['PHP_SELF']}?$res&amp;feed_mode=rss",
 +
        'css_class' => FALSE,
 +
        'mkname' => 'rss',
 +
        'lightbox' => FALSE
 +
);
 +
// Atom feed
 +
$group_feeds[] =
 +
    array(
 +
        'type' => 'text',
 +
        'href' => "{$_SERVER['PHP_SELF']}?$res&amp;feed_mode=atom",
 +
        'css_class' => FALSE,
 +
        'mkname' => 'atom',
 +
        'lightbox' => FALSE
 +
);
 +
</pre>
 +
 +
==== Downloads ====
 +
<pre>
 +
// DOWNLOADS
 +
$res = "results_mode=dl";
 +
// CSV download
 +
$group_dls[] =
 +
    array(
 +
        'type' => 'text',
 +
        'href' => "overlay_holder.php?$res&amp;dl_mode=csv&amp;lboxreload=1&amp;sf_conf=conf_mac_exportdownloadcsv",
 +
        'css_class' => FALSE,
 +
        'mkname' => 'csv',
 +
        'lightbox' => 'lightbox|200'
 +
);
 +
</pre>
 +
 +
And then put them in the toolbar conf array:
 +
<pre>
 +
// Package these button groups up into a toolbar
 +
$conf_results_nav =
 +
    array(
 +
        'tools' => $group_tools,
 +
        'result_views' => $group_disp,
 +
        'result_feeds' => $group_feeds,
 +
        'result_downloads' => $group_dls,
 +
);
 +
</pre>
 +
 +
==Micro View (Record View)==
 +
These settings configure the micro view (or record view) page. The micro view requires configuration for the left panel, and record nav options as well as some general settings.
 +
===General Page Settings===
 +
Configure the index page for the micro view:
 +
<pre>
 +
// Default Micro viewer page (used by search result handlers)
 +
$conf_micro_viewer = $ark_dir."micro_view.php";
 +
</pre>
 +
===Micro View Page Settings===
 +
<pre>
 +
// PAGE SETTINGS
 +
$conf_page_micro_view =
 +
    array(
 +
        'name' =>'Record View',
 +
        'title' => 'Record View Page',
 +
        'file' => 'micro_view.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'recordviewnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/micro_view/',
 +
        'is_visible' => TRUE
 +
);
 +
</pre>
 +
===Micro View Left Panel===
 +
Configures the left panel in the micro view pages, requires the administrator to configure the left panel with either Option 1 (linklists) or Option 2 (subforms) as defined in the [[left_panel]] documentation. Requires the $mvlpoutput to be set, and when using the subform option requires the 'ark_page' to be set to 'micro_view' in the [[sf_module]].
 +
 +
====Subforms Option Example====
 +
Define the configuration type:
 +
<pre>
 +
$mvlpoutput = 'subforms';
 +
</pre>   
 +
Configure the subform module to include the relevant modules:
 +
<pre>
 +
$mvlp_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'=> 'micro_view',
 +
        'fields' => array (
 +
            'cxt',
 +
            'smp',
 +
            'spf',
 +
            'sph'
 +
            )
 +
);
 +
</pre>
 +
Load the subform:
 +
<pre>
 +
$micro_view_left_panel =
 +
    array(
 +
        'col_id' => 'mvlp',
 +
        'col_alias' => FALSE,
 +
        'col_type' => 'primary_col',
 +
        'subforms' =>
 +
            array(
 +
                $mvlp_subform_module
 +
        )
 +
);
 +
</pre>
 +
===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.
 +
 +
==== Record Navigation ====
 +
First form the individual buttons and displays:
 +
<pre>
 +
// 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
 +
);
 +
</pre>
 +
 +
==== Refresh View ====
 +
<pre>
 +
// Refresh button
 +
$group_refresh[] =
 +
    array(
 +
'name' => 'refresh',
 +
        'type' => 'img',
 +
        'href' => "{$_SERVER['PHP_SELF']}?disp_reset=default",
 +
        'css_class' => 'refresh',
 +
        'mkname' => 'reset',
 +
        'lightbox' => FALSE
 +
);
 +
</pre>
 +
 +
==== Administrator Tools ====
 +
<pre>
 +
// 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'
 +
);
 +
</pre>
 +
 +
And then put them in the toolbar conf array:
 +
<pre>
 +
// Package these button groups up into a toolbar
 +
$conf_record_nav =
 +
    array(
 +
    'record_nav' => $group_nav,
 +
        'record_refresh' => $group_refresh,
 +
        'record_admin' => $group_admin,
 +
);
 +
</pre>
 +
 +
==Map View==
 +
This is optional, but needs to be configured correctly if you are using the mapping capabilities of ARK. It needs to be set up like other top level pages, but also a series of settings need to be configured.
 +
 +
===Map View Page Settings===
 +
The page needs to be set up like all other standard top-level pages. If not using, or if you would like it to be inaccessible in the dynamic navigation set  'is_visible' to FALSE.
 +
 +
<pre>
 +
// MAP VIEW PAGE SETTINGS
 +
$conf_page_map_view =
 +
    array(
 +
        'name' =>'Map View',
 +
        'title' => 'Map View Page',
 +
        'file' => 'map_view.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'mapviewnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/map_view/',
 +
        'is_visible' => TRUE
 +
);
 +
</pre>
 +
 +
===Map View Left Panel===
 +
The first subform is to allow saving of maps from the left panel, and the second to allow downloads of maps as PDFs.
 +
<pre>
 +
// LEFT PANEL
 +
// Subforms
 +
$conf_map_wmcoverlay =
 +
    array(
 +
        'view_state' => 'max',
 +
        'edit_state' => 'view',
 +
        'sf_nav_type' => 'nmedit',
 +
        'sf_title' => 'wmcoverlay',
 +
        'sf_html_id' => 'map_wmcoverlay', // Must be unique
 +
        'script' => 'php/map_admin/subforms/sf_savewmc_overlay.php',
 +
        'op_label' => 'space',
 +
        'op_input' => 'save',
 +
        'fields' => array(
 +
    )
 +
);
 +
 +
$conf_maptopdf =
 +
    array(
 +
        'view_state' => 'max',
 +
        'edit_state' => 'view',
 +
        'sf_nav_type' => 'full',
 +
        'sf_title' => 'interp',
 +
        'sf_html_id' => 'map_maptopdf', // Must be unique
 +
        'script' => 'php/map_view/subforms/sf_maptopdf.php',
 +
        'op_label' => 'space',
 +
        'op_input' => 'save',
 +
        'fields' => array(
 +
    )
 +
);
 +
</pre>
 +
===Map View Main===
 +
These are a series of settings that define the query layers and query maps displayed in the map view as well as the results map view.
 +
====Map Timeout====
 +
Mapping timeout in milliseconds- if you are using a slow WxS server set this to be high (default is 1500).
 +
<pre>
 +
    $map_timeout = 5000;
 +
</pre>
 +
====WXS Query Layers====
 +
$wxs_qlayers: mapping layers for mods - specify in this array the names of the wms/wfs layers that contain the spatial data for each mod. Bear in mind that these layers should contain an ark_id column that can be retrieved using a getFeatureInfo request.
 +
Each layer is a separate entry in the array containing an array of variables:
 +
 +
*'''mod''' - the mod of the item (without _cd) eg. 'cxt'
 +
*'''geom''' - the geometry of the layer - eg. 'pt', 'pl' or 'pgn'
 +
*'''url''' - the full url of the WMS/WFS server that is hosting the layer
 +
*'''title_field''' - this is the field_id of the field that you want to be displayed during the click to query, if this is set to 'GIS' then it will return the attributes in the remote GIS attribute table.
 +
<pre>
 +
$wxs_qlayers =
 +
    array(
 +
        'sites' => array(
 +
            'mod' => 'cxt',
 +
            'geom' => 'pt',
 +
            'url' => 'http://localhost/ark/php/map/ark_wxs_server.php?',
 +
            'title_field' => 'conf_field_name',
 +
            'style_array' =>
 +
                array(
 +
                'fillOpacity' => 0.75,
 +
                'strokeColor' => '"black"',
 +
                'fillColor' => '"red"',
 +
                'pointRadius' => 10,
 +
                )
 +
        ),
 +
);
 +
</pre>
 +
 +
====WXS Query Map====
 +
$wxs_query_map - this is the name of a saved map (saved using the map_admin tools), that you want to be the background for the 'View Results as Map'. Admins should note: the $wxs_qlayers array is used to determine which layers can be used to display the spatial data for each mod - therefore those layers HAVE to be available in the saved $wxs_query_map. Also, the more info button - if you store information about your GIS layers as ARK items then set this to TRUE. Please note you will need to have a 'gis' module and you will need to name your WMS-served GIS layers in the format for instance,'contexts_PCO06_123'
 +
<pre>
 +
$wxs_query_map = 'QueryMap';
 +
 +
$map_more_info_button = FALSE;
 +
</pre>
 +
 +
==Other Pages==
 +
These settings configure the the page settings array for all other pages. These can include pages that do not have any other associated configuration needed, or other commonly hidden pages that are included with the trunk code (index.php, overlay_holder.php).
 +
<pre>
 +
// ADMIN PAGES
 +
// USER ADMIN PAGE SETTINGS
 +
$conf_page_user_admin =
 +
    array(
 +
        'name' =>'User Admin',
 +
        'title' => 'User Admin Page',
 +
        'file' => 'user_admin.php',
 +
        'sgrp' => '2',
 +
        'navname' => 'usersnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/user_admin/',
 +
        'is_visible' => TRUE
 +
);
 +
 +
// ALIAS ADMIN PAGE SETTINGS
 +
$conf_page_alias_admin =
 +
    array(
 +
        'name' =>'Alias Admin',
 +
        'title' => 'Alias Admin Page',
 +
        'file' => 'alias_admin.php',
 +
        'sgrp' => '2',
 +
        'navname' => 'aliasnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/alias_admin/',
 +
        'is_visible' => TRUE       
 +
);
 +
 +
// MARKUP ADMIN PAGE SETTINGS
 +
$conf_page_markup_admin =
 +
    array(
 +
        'name' => 'Markup Admin',
 +
        'title' => 'Markup Admin Page',
 +
        'file' => 'markup_admin.php',
 +
        'sgrp' => '2',
 +
        'navname' => 'markupnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/markup_admin/',
 +
        'is_visible' => TRUE
 +
);
 +
 +
// MAP ADMIN PAGE SETTINGS
 +
$conf_page_map_admin =
 +
    array(
 +
        'name' => 'Map Admin',
 +
        'title' => 'Map Admin Page',
 +
        'file' => 'map_admin.php',
 +
        'sgrp' => '2',
 +
        'navname' => 'mapadminnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => 'php/map_admin/',
 +
        'is_visible' => TRUE
 +
);
 +
 +
// HIDDEN PAGES
 +
// FEED PAGE SETTINGS
 +
$conf_page_feed =
 +
    array(
 +
        'name' => 'Feed',
 +
        'title' => 'Feed Page',
 +
        'file' => 'feed.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'feednav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// DOWNLOAD PAGE SETTINGS
 +
$conf_page_download =
 +
    array(
 +
        'name' => 'Download',
 +
        'title' => 'Download Page',
 +
        'file' => 'download.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'downloadnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// TRANSCLUDE PAGE SETTINGS
 +
$conf_page_transclude_object =
 +
    array(
 +
        'name' => 'Transclude',
 +
        'title' => 'Transclude Page',
 +
        'file' => 'transclude_object.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'transcludenav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// IMPORT PAGE SETTINGS
 +
$conf_page_import =
 +
    array(
 +
        'name' => 'Import',
 +
        'title' => 'Import',
 +
        'file' => 'import.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'importnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// RESULTS MICRO PAGE SETTINGS
 +
$conf_page_resultsmicro_view =
 +
    array(
 +
        'name' => 'All Records',
 +
        'title' => 'All Records',
 +
        'file' => 'resultsmicro_view.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'allrecordsnav',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// INDEX PAGE SETTINGS
 +
$conf_page_index =
 +
    array(
 +
        'name' => 'Index',
 +
        'title' => 'Index',
 +
        'file' => 'index.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'index',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 +
);
 +
 +
// OVERLAY HOLDER PAGE SETTINGS
 +
$conf_page_overlay_holder =
 +
    array(
 +
        'name' => 'Overlay',
 +
        'title' => 'Overlay',
 +
        'file' => 'overlay_holder.php',
 +
        'sgrp' => '1',
 +
        'navname' => 'overlayholder',
 +
        'navlinkvars' => '?view=home',
 +
        'cur_code_dir' => FALSE,
 +
        'is_visible' => FALSE
 
);
 
);
 
</pre>
 
</pre>

Latest revision as of 16:52, 21 March 2012

As of v1.0, all settings related to individual page displays, navigation, and toolbars are to be included in the page_settings.php.

Navigation

Navigation Pages

As of v1.1 $conf_hide_pages has been replaced with $conf_pages. All pages listed in this array will appear in the main nav. Overlay holder, download, feed, and transclude object are required pages with their visibility setting set to FALSE so they do not appear in the navigation. As of v1.1, each page also requires its own settings array, as detailed under each page heading below.

$conf_pages =
    array(
        'user_home',
        'data_entry',
        'micro_view',
        'data_view',
        'user_admin',
        'alias_admin',
        'markup_admin',
        'import',
        'resultsmicro_view',
        'index',
        'overlay_holder',
        'download',
        'feed',
        'transclude_object'
);

Navigation Links

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'
);

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 Page Settings

As of v1.1 an individual page setting array is required for each page directing the ARK to the code directory and navigation settings for that particular page.

// PAGE SETTINGS
$conf_page_user_home =
    array(
        'name' => 'User Home',
        'title' => 'User Home Page',
        'file' => 'user_home.php',
        'sgrp' => '1',
        'navname' => 'homenav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/user_home/',
        'is_visible' => TRUE
);

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) as defined in the left_panel documentation. 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 Page Settings

// PAGE SETTINGS
$conf_page_data_entry =
    array(
        'name' =>'Data Entry',
        'title' => 'Data Entry Page',
        'file' => 'data_entry.php',
        'sgrp' => '1',
        'navname' => 'dataentrynav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/data_entry/',
        'is_visible' => TRUE
);

Data Entry Left Panel

This section gives examples for the left panel configuration in the data entry pages using either Option 1 (linklists) or Option 2 (subforms) as defined in the left_panel documentation.

Minimiser Option

This tool condenses subforms and offers quick navigation in left panel. To use the minimiser on specific data entry pages you need to go to the mod_settings files (ex. mod_cxt_settings.php) and make sure that 'col_type' => 'collaps_col', instead of single_col in the $conf_dat_materi and $conf_dat_detfrm settings.

$minimiser = TRUE;

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
        )
);

Data Entry Toolbar

Configure the tools for data entry. First form the individual buttons and displays:

User Navigation

// Previous record button
$group_entry_nav[] =
    array(
	 'name' => 'prev',
        'type' => 'text',
        'href' => "",
        'css_class' => FALSE,
        'mkname' => 'prev',
        'lightbox' => FALSE
);
// Displays site code
$group_entry_nav[] =
    array(
	'name' => 'ste_cd',
        'type' => 'text',
        'href' => "",
        'css_class' => FALSE,
        'mkname' => 'ste_cd',
        'lightbox' => FALSE
);
// Displays record number
$group_entry_nav[] =
    array(
	'name' => 'current',
        'type' => 'text',
        'href' => "",
        'css_class' => FALSE,
        'mkname' => 'current',
        'lightbox' => FALSE
);
// Displays module type
$group_entry_nav[] =
    array(
	'name' => 'modtype',
        'type' => 'text',
        'href' => "",
        'css_class' => FALSE,
        'mkname' => 'modtype',
        'lightbox' => FALSE
);
// Next record button
$group_entry_nav[] =
    array(
	'name' => 'next',
        'type' => 'text',
        'href' => "",
        'css_class' => FALSE,
        'mkname' => 'next',
        'lightbox' => FALSE
);

Administrator tools

// Delete record
$group_entry_admin[] =
    array(
        'name' => 'delete',
        'type' => 'img',
        'href' => FALSE,
        'css_class' => 'delimg',
        'mkname' => 'del',
        'lightbox' => 'lightbox|200'
);
// Edit module type
$group_entry_admin[] =
    array(
	'name' => 'changemod',
        'type' => 'text',
	'href' => FALSE,
        'css_class' => 'recedit',
        'mkname' => 'chngmod',
        'lightbox' => 'lightbox|200'
);
// Edit record number
$group_entry_admin[] =
    array(
	'name' => 'changeval',
        'type' => 'text',
	'href' => FALSE,
        'css_class' => 'recedit',
        'mkname' => 'DEL',
        'lightbox' => 'lightbox|200'
);

And then put them in the toolbar conf array:

// Package these button groups up into a toolbar
$conf_entry_nav =
    array(
	'record_nav' => $group_entry_nav,
        'record_admin' => $group_entry_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", 
);

Data View (Search)

These settings configure the data view (or search) page. The data view requires configuration for the left panel, the search tools options (results views, download options, etc) as well as some general settings for search results.

General Page Settings

Configure the viewers to display a set number of rows:

// Number of rows to display on the data viewer
$conf_viewer_rows = 25;

And the number of pages to display on the data viewer:

// Number of pages to display on the data viewer
$conf_num_res_pgs = 5; // best choose an odd number

Also configure the index pages for Data View and Search pages:

// Default data viewer page
$conf_data_viewer = $ark_dir."data_view.php";
// Default search page - search funtions will send data thru to this page
$conf_search_viewer = $ark_dir."data_view.php";

Set the default for search results display (options include: text, table, or map):

// Default $output_mode for the data viewer
$default_output_mode = 'table';

Data View Page Settings

// PAGE SETTINGS
$conf_page_data_view =
    array(
        'name' =>'Search',
        'title' => 'Search Page',
        'file' => 'data_view.php',
        'sgrp' => '1',
        'navname' => 'searchnav',
        'navlinkvars' => '?view=standard',
        'cur_code_dir' => 'php/data_view/',
        'is_visible' => TRUE
);

Data View Left Panel

This configures the left panel for the data view pages through a series of complex subforms including sf_linklist, sf_buildfilter, and sf_mysavedstuff.

Configure the linklist

First configure the linklist, which requires the following:

  • href - link to the output ({$_SERVER['PHP_SELF']} is on same page, and then links to the key ID in the relevant cor table of the designated data filter
  • mknname - mark-up nickname will search the markup table for this nickname and print the markup
  • img - optional image for the icon defined in the subform linklist:
$link_list_filters[] = 
array(
	'href' => "{$_SERVER['PHP_SELF']}?ftype=key&key=1&ftr_id=new", 
	'mknname' => 'filtercxt',
	'img' => 'view_mag.png'
	);
$link_list_filters[] = 
array(
        'href' => "{$_SERVER['PHP_SELF']}?ftype=key&key=6&ftr_id=new", 
        'mknname' => 'filtersmp',
        'img' => 'view_mag.png'
        );
$link_list_filters[] = 
array(
	'href' => "{$_SERVER['PHP_SELF']}?ftype=stecd&ftr_id=new", 
        'mknname' => 'filterstecd',
        'img' => 'view_mag.png'
        );
$link_list_filters[] = 
array(
	'href' => "{$_SERVER['PHP_SELF']}?ftype=action&ftr_id=new", 
        'mknname' => 'filteractor',
        'img' => 'view_mag.png'
        );
$link_list_filters[] = 
array(
	'href' => "{$_SERVER['PHP_SELF']}?ftype=ftx&ftr_id=new", 
        'mknname' => 'ftx',
        'img' => 'view_mag.png'
        );

Configure the linklist subform:

$dvlp_subform_filters =
    array(
        'view_state' => 'min',
        'edit_state' => 'view',
        'sf_nav_type' => 'name',
        'sf_title' => 'dvlp_filters', 
        'sf_html_id' => 'dvlp_filters', // Must be unique
        'script' => 'php/subforms/sf_linklist.php',
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
        // Does the linklist use an icon instead of a label as link
        'op_linktype' => 'icon',
        'op_sf_cssclass' => 'ftr_list',
        'fields' => $link_list_filters
);

Filter Builders

Various options exist for the types of filters administrators will want to make available to users- including different stages of pre-built or partially executed filters. For more information on this subform and options see sf_buildfilter.
Subform for the filter builder to run in the left panel:

$dvlp_filter_builder =
    array(
        'view_state' => 'min',
        'edit_state' => 'view',
        'sf_nav_type' => 'none',
        'sf_title' => 'dvlp_filters', 
        'sf_html_id' => 'dvlp_filters', // Must be unique
        'script' => 'php/data_view/subforms/sf_buildfilter.php',
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
        // Does the linklist use an icon instead of a label as link
        'op_sf_cssclass' => 'ftr_subform',
        'op_condition' =>
            array(
                array(
                    'func'=> 'chkTmpFtr',
                    'args'=> FALSE
            ), 
        ),
);

Subform for the filter builder to run in the left panel preloaded with a filter:

$dvlp_filter_builder_atridx =
    array(
        'view_state' => 'min',
        'edit_state' => 'view',
        'sf_nav_type' => 'none',
        'sf_title' => 'dvlp_filters', 
        'sf_html_id' => 'dvlp_filters', // Must be unique
        'script' => 'php/data_view/subforms/sf_buildfilter.php',
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
        // Does the linklist use an icon instead of a label as link
        'op_sf_cssclass' => 'ftr_subform',
        'op_filter' => 'atr', // the filter to be used
        'op_filter_args' =>
            array(
                // 'arg' => 'var', // example
                'atrtype' => 1,
                'op_display' => 'dd'
        )
);

Subform for user saved filters

$dvlp_my_saved_filters =
    array(
        'view_state' => 'min',
        'edit_state' => 'view',
        'sf_nav_type' => 'name',
        'sf_title' => 'savedfilters', 
        'sf_html_id' => 'dvlp_saved_filters', // Must be unique
        'script' => 'php/data_view/subforms/sf_mysavedstuff.php',
        'op_modtype' => FALSE, //if each modtype uses same fields (see below)
        'op_sf_cssclass' => 'ftr_subform',
);

Make a column to hold the subforms:

$data_view_left_panel =
    array(
        'col_id' => 'dvlp',
        'col_alias' => FALSE,
        'col_type' => 'primary_col',
        'subforms' =>
            array(
                $dvlp_filter_builder,
                $dvlp_filter_builder_atridx,
                $dvlp_subform_filters,
                $dvlp_my_saved_filters
        )
);

Results Toolbar

Configure the tools and display options for the search page (data_view). All of the toolbars require the following in the array:

  • type - Options of 'img', 'text', or 'newpage' (used in the all record view to display function in a new page)
  • href - The href link to the function being called
  • css_class - The css class to style the button or display
  • mkname - The name of markup contained within cor_tbl_markup used for buttons which combine text and images, are just text based. Set to FALSE if not used.
  • lightbox - Option of using the lightbox when calling an overlay form, set to FALSE otherwise

First form the individual buttons:

Tools

// TOOLS
$group_tools[] =
    array(
        'type' => 'img',
        'href' => "overlay_holder.php?sf_conf=conf_mac_userconfigfields&lboxreload=1",
        'css_class' => 'gears',
        'mkname' => FALSE,
        'lightbox' => 'lightbox'
);

Displays

// DISPs
$res = "results_mode=disp";
// Text view
$group_disp[] =
    array(
        'type' => 'img',
        'href' => "{$_SERVER['PHP_SELF']}?$res&disp_mode=text",
        'css_class' => 'text',
        'mkname' => FALSE,
        'lightbox' => FALSE
);
// Table view
$group_disp[] =
    array(
        'type' => 'img',
        'href' => "{$_SERVER['PHP_SELF']}?$res&disp_mode=table",
        'css_class' => 'table',
        'mkname' => FALSE,
        'lightbox' => FALSE
);
// Map view
$group_disp[] =
    array(
        'type' => 'img',
        'href' => "{$_SERVER['PHP_SELF']}?$res&disp_mode=map",
        'css_class' => 'map',
        'mkname' => FALSE,
        'lightbox' => FALSE
);
// All record view
$group_disp[] =
    array(
        'type' => 'newpage',
        'href' => "resultsmicro_view.php?",
        'css_class' => 'printall',
        'mkname' => FALSE,
        'lightbox' => FALSE
);    

Feeds

// FEEDS
$res = "results_mode=feed";
// RSS feed
$group_feeds[] =
    array(
        'type' => 'text',
        'href' => "{$_SERVER['PHP_SELF']}?$res&feed_mode=rss",
        'css_class' => FALSE,
        'mkname' => 'rss',
        'lightbox' => FALSE
);
// Atom feed
$group_feeds[] =
    array(
        'type' => 'text',
        'href' => "{$_SERVER['PHP_SELF']}?$res&feed_mode=atom",
        'css_class' => FALSE,
        'mkname' => 'atom',
        'lightbox' => FALSE
);

Downloads

// DOWNLOADS
$res = "results_mode=dl";
// CSV download
$group_dls[] =
    array(
        'type' => 'text',
        'href' => "overlay_holder.php?$res&dl_mode=csv&lboxreload=1&sf_conf=conf_mac_exportdownloadcsv",
        'css_class' => FALSE,
        'mkname' => 'csv',
        'lightbox' => 'lightbox|200'
);

And then put them in the toolbar conf array:

// Package these button groups up into a toolbar
$conf_results_nav =
    array(
        'tools' => $group_tools,
        'result_views' => $group_disp,
        'result_feeds' => $group_feeds,
        'result_downloads' => $group_dls,
);

Micro View (Record View)

These settings configure the micro view (or record view) page. The micro view requires configuration for the left panel, and record nav options as well as some general settings.

General Page Settings

Configure the index page for the micro view:

// Default Micro viewer page (used by search result handlers)
$conf_micro_viewer = $ark_dir."micro_view.php";

Micro View Page Settings

// PAGE SETTINGS
$conf_page_micro_view =
    array(
        'name' =>'Record View',
        'title' => 'Record View Page',
        'file' => 'micro_view.php',
        'sgrp' => '1',
        'navname' => 'recordviewnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/micro_view/',
        'is_visible' => TRUE
);

Micro View Left Panel

Configures the left panel in the micro view pages, requires the administrator to configure the left panel with either Option 1 (linklists) or Option 2 (subforms) as defined in the left_panel documentation. Requires the $mvlpoutput to be set, and when using the subform option requires the 'ark_page' to be set to 'micro_view' in the sf_module.

Subforms Option Example

Define the configuration type:

$mvlpoutput = 'subforms';

Configure the subform module to include the relevant modules:

$mvlp_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'=> 'micro_view',
        'fields' => array (
            'cxt',
            'smp',
            'spf',
            'sph'
            )
); 

Load the subform:

$micro_view_left_panel =
    array(
        'col_id' => 'mvlp',
        'col_alias' => FALSE,
        'col_type' => 'primary_col',
        'subforms' =>
            array(
                $mvlp_subform_module
        )
);

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.

Record Navigation

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,
);

Map View

This is optional, but needs to be configured correctly if you are using the mapping capabilities of ARK. It needs to be set up like other top level pages, but also a series of settings need to be configured.

Map View Page Settings

The page needs to be set up like all other standard top-level pages. If not using, or if you would like it to be inaccessible in the dynamic navigation set 'is_visible' to FALSE.

// MAP VIEW PAGE SETTINGS
$conf_page_map_view =
    array(
        'name' =>'Map View',
        'title' => 'Map View Page',
        'file' => 'map_view.php',
        'sgrp' => '1',
        'navname' => 'mapviewnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/map_view/',
        'is_visible' => TRUE
);

Map View Left Panel

The first subform is to allow saving of maps from the left panel, and the second to allow downloads of maps as PDFs.

// LEFT PANEL
// Subforms
$conf_map_wmcoverlay =
    array(
        'view_state' => 'max',
        'edit_state' => 'view', 
        'sf_nav_type' => 'nmedit',
        'sf_title' => 'wmcoverlay', 
        'sf_html_id' => 'map_wmcoverlay', // Must be unique
        'script' => 'php/map_admin/subforms/sf_savewmc_overlay.php',
        'op_label' => 'space',
        'op_input' => 'save',
        'fields' => array(
     )
);

$conf_maptopdf =
    array(
        'view_state' => 'max',
        'edit_state' => 'view', 
        'sf_nav_type' => 'full',
        'sf_title' => 'interp', 
        'sf_html_id' => 'map_maptopdf', // Must be unique
        'script' => 'php/map_view/subforms/sf_maptopdf.php',
        'op_label' => 'space',
        'op_input' => 'save',
        'fields' => array(
    )
);

Map View Main

These are a series of settings that define the query layers and query maps displayed in the map view as well as the results map view.

Map Timeout

Mapping timeout in milliseconds- if you are using a slow WxS server set this to be high (default is 1500).

    $map_timeout = 5000;

WXS Query Layers

$wxs_qlayers: mapping layers for mods - specify in this array the names of the wms/wfs layers that contain the spatial data for each mod. Bear in mind that these layers should contain an ark_id column that can be retrieved using a getFeatureInfo request. Each layer is a separate entry in the array containing an array of variables:

  • mod - the mod of the item (without _cd) eg. 'cxt'
  • geom - the geometry of the layer - eg. 'pt', 'pl' or 'pgn'
  • url - the full url of the WMS/WFS server that is hosting the layer
  • title_field - this is the field_id of the field that you want to be displayed during the click to query, if this is set to 'GIS' then it will return the attributes in the remote GIS attribute table.
$wxs_qlayers = 
    array(
        'sites' => array(
            'mod' => 'cxt',
            'geom' => 'pt',
            'url' => 'http://localhost/ark/php/map/ark_wxs_server.php?',
            'title_field' => 'conf_field_name',
            'style_array' => 
                array(
                'fillOpacity' => 0.75,
                'strokeColor' => '"black"',
                'fillColor' => '"red"',
                'pointRadius' => 10,
                )
        ),
);

WXS Query Map

$wxs_query_map - this is the name of a saved map (saved using the map_admin tools), that you want to be the background for the 'View Results as Map'. Admins should note: the $wxs_qlayers array is used to determine which layers can be used to display the spatial data for each mod - therefore those layers HAVE to be available in the saved $wxs_query_map. Also, the more info button - if you store information about your GIS layers as ARK items then set this to TRUE. Please note you will need to have a 'gis' module and you will need to name your WMS-served GIS layers in the format for instance,'contexts_PCO06_123'

$wxs_query_map = 'QueryMap';

$map_more_info_button = FALSE;

Other Pages

These settings configure the the page settings array for all other pages. These can include pages that do not have any other associated configuration needed, or other commonly hidden pages that are included with the trunk code (index.php, overlay_holder.php).

// ADMIN PAGES
// USER ADMIN PAGE SETTINGS
$conf_page_user_admin =
    array(
        'name' =>'User Admin',
        'title' => 'User Admin Page',
        'file' => 'user_admin.php',
        'sgrp' => '2',
        'navname' => 'usersnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/user_admin/',
        'is_visible' => TRUE
);

// ALIAS ADMIN PAGE SETTINGS
$conf_page_alias_admin =
    array(
        'name' =>'Alias Admin',
        'title' => 'Alias Admin Page',
        'file' => 'alias_admin.php',
        'sgrp' => '2',
        'navname' => 'aliasnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/alias_admin/',
        'is_visible' => TRUE        
);

// MARKUP ADMIN PAGE SETTINGS
$conf_page_markup_admin =
    array(
        'name' => 'Markup Admin',
        'title' => 'Markup Admin Page',
        'file' => 'markup_admin.php',
        'sgrp' => '2',
        'navname' => 'markupnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/markup_admin/',
        'is_visible' => TRUE
);

// MAP ADMIN PAGE SETTINGS
$conf_page_map_admin =
    array(
        'name' => 'Map Admin',
        'title' => 'Map Admin Page',
        'file' => 'map_admin.php',
        'sgrp' => '2',
        'navname' => 'mapadminnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => 'php/map_admin/',
        'is_visible' => TRUE
);

// HIDDEN PAGES
// FEED PAGE SETTINGS
$conf_page_feed =
    array(
        'name' => 'Feed',
        'title' => 'Feed Page',
        'file' => 'feed.php',
        'sgrp' => '1',
        'navname' => 'feednav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// DOWNLOAD PAGE SETTINGS
$conf_page_download =
    array(
        'name' => 'Download',
        'title' => 'Download Page',
        'file' => 'download.php',
        'sgrp' => '1',
        'navname' => 'downloadnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// TRANSCLUDE PAGE SETTINGS
$conf_page_transclude_object =
    array(
        'name' => 'Transclude',
        'title' => 'Transclude Page',
        'file' => 'transclude_object.php',
        'sgrp' => '1',
        'navname' => 'transcludenav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// IMPORT PAGE SETTINGS
$conf_page_import =
    array(
        'name' => 'Import',
        'title' => 'Import',
        'file' => 'import.php',
        'sgrp' => '1',
        'navname' => 'importnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// RESULTS MICRO PAGE SETTINGS
$conf_page_resultsmicro_view =
    array(
        'name' => 'All Records',
        'title' => 'All Records',
        'file' => 'resultsmicro_view.php',
        'sgrp' => '1',
        'navname' => 'allrecordsnav',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// INDEX PAGE SETTINGS
$conf_page_index =
    array(
        'name' => 'Index',
        'title' => 'Index',
        'file' => 'index.php',
        'sgrp' => '1',
        'navname' => 'index',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);

// OVERLAY HOLDER PAGE SETTINGS
$conf_page_overlay_holder =
    array(
        'name' => 'Overlay',
        'title' => 'Overlay',
        'file' => 'overlay_holder.php',
        'sgrp' => '1',
        'navname' => 'overlayholder',
        'navlinkvars' => '?view=home',
        'cur_code_dir' => FALSE,
        'is_visible' => FALSE
);