Difference between revisions of "Settings.php"

From ARK
Jump to: navigation, search
Line 3: Line 3:
 
==Links==
 
==Links==
  
 +
This includes the server [[environment settings]].
 
<pre>
 
<pre>
 
// Include settings related to your server environment
 
// Include settings related to your server environment
 
include('env_settings.php');
 
include('env_settings.php');
 
</pre>
 
</pre>
 
This includes the server [[environment settings]].
 
  
 
==General==
 
==General==
  
 +
This sets the display name of the ARK instance. Used in page titles etc.
 
<pre>
 
<pre>
 
// The Ark name
 
// The Ark name
Line 17: Line 17:
 
</pre>
 
</pre>
  
This sets the display name of the ARK instance. Used in page titles etc.
+
The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
 
 
<pre>
 
<pre>
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/v2/';
 
$ark_dir = '/v2/';
 
<pre>
 
<pre>
The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
  
 +
A list of loaded modules
 
<pre>
 
<pre>
 
//array of loaded modules
 
//array of loaded modules
Line 36: Line 35:
 
);
 
);
 
</pre>
 
</pre>
A list of loaded modules
 
  
 +
A default itemkey. Not essential but handy in guessing the itemkey sometimes.
 
<pre>
 
<pre>
 
//  The default item key for this instance of Ark.
 
//  The default item key for this instance of Ark.
 
$default_itemkey = 'fst_cd';
 
$default_itemkey = 'fst_cd';
 
</pre>
 
</pre>
A default itemkey. Not essential but handy in guessing the itemkey sometimes.
 
  
==Example==
+
==Database==
 +
 
 
<pre>
 
<pre>
// Include settings related to your server environment
 
include('env_settings.php');
 
 
// GENERAL
 
// The Ark name
 
$ark_name = 'FASTI admin';
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/v2/';
 
//array of loaded modules
 
$loaded_modules =
 
    array(
 
        'fst',
 
        'sea',
 
        'bib',
 
        'rpt',
 
        'abk',
 
);
 
//  The default item key for this instance of Ark.
 
$default_itemkey = 'fst_cd';
 
 
 
// DATABASE
 
// DATABASE
 
// The mysql db name of this instance of ark
 
// The mysql db name of this instance of ark
Line 77: Line 56:
 
// DSN (this shouldn;t need adjusting)
 
// DSN (this shouldn;t need adjusting)
 
$dsn = 'mysql://'.$sql_user.':'.$sql_pwd.'@'.$sql_server.'/'.$ark_db;
 
$dsn = 'mysql://'.$sql_user.':'.$sql_pwd.'@'.$sql_server.'/'.$ark_db;
 +
</pre>
 +
 +
==Security==
  
 +
<pre>
 
/*SECURITY
 
/*SECURITY
 
  *these are the names of the liveuser objects. They should be unique per ARK  
 
  *these are the names of the liveuser objects. They should be unique per ARK  
Line 93: Line 76:
 
//$anonymous_login['username'] = 'anon';
 
//$anonymous_login['username'] = 'anon';
 
//$anonymous_login['password'] = 'anon';
 
//$anonymous_login['password'] = 'anon';
 +
</pre>
  
 +
==Skin==
  
 +
<pre>
 
// SKIN
 
// SKIN
 
// Skin name
 
// Skin name
Line 100: Line 86:
 
// Skin path
 
// Skin path
 
$skin_path = "$ark_dir"."skins/$skin";
 
$skin_path = "$ark_dir"."skins/$skin";
 +
</pre>
  
 +
==Forms==
  
 +
<pre>
 
// FORMS
 
// FORMS
 
//Default year as a setting for form data entry
 
//Default year as a setting for form data entry
Line 107: Line 96:
 
//Default site code
 
//Default site code
 
$default_site_cd = 'AIAC';
 
$default_site_cd = 'AIAC';
 +
</pre>
  
 +
==Viewers==
  
 +
<pre>
 
// VIEWERS
 
// VIEWERS
 
// FIXME: make this an option of the table setup array
 
// FIXME: make this an option of the table setup array
Line 121: Line 113:
 
//Default $output_mode for the data viewer
 
//Default $output_mode for the data viewer
 
$default_output_mode = 'tbl';
 
$default_output_mode = 'tbl';
 +
</pre>
  
 +
==Mapping==
 +
 +
<pre>
 
// MAPPING
 
// MAPPING
 
// Path to clarent (web)
 
// Path to clarent (web)
Line 142: Line 138:
 
//spatial modules - these are the modules that have geometry
 
//spatial modules - these are the modules that have geometry
 
$spat_mods = array('cor');
 
$spat_mods = array('cor');
 +
</pre>
  
 +
==Logging==
 +
 +
<pre>
 
// LOGGING
 
// LOGGING
 
//Logging levels
 
//Logging levels
Line 148: Line 148:
 
$conf_log_edt = 'on';
 
$conf_log_edt = 'on';
 
$conf_log_del = 'on';
 
$conf_log_del = 'on';
 +
</pre>
  
 +
==Search Engine==
  
 +
<pre>
 
// SEARCH ENGINE
 
// SEARCH ENGINE
 
// words to cut out of multi string searches
 
// words to cut out of multi string searches
 
$conf_non_search_words = array('and', 'di', 'in');
 
$conf_non_search_words = array('and', 'di', 'in');
 +
</pre>
  
 +
==Languages==
  
 +
<pre>
 
// LANGUAGES
 
// LANGUAGES
 
// The default lang
 
// The default lang
Line 160: Line 166:
 
// These are the languages in use (in order)
 
// These are the languages in use (in order)
 
$conf_langs = array('en', 'it', 'ro', 'mk');
 
$conf_langs = array('en', 'it', 'ro', 'mk');
 +
</pre>
  
 +
==Fields==
  
 +
<pre>
 
// FIELDS
 
// FIELDS
 
include_once('field_settings.php');
 
include_once('field_settings.php');
 +
</pre>
  
 +
==Doctype==
  
 +
<pre>
 
// DOCTYPE
 
// DOCTYPE
 
// The doctype to use for web output
 
// The doctype to use for web output
Line 171: Line 183:
 
     PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n
 
     PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n
 
     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"";
 
     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"";
 +
</pre>
  
 +
==Navigation Links==
  
 +
<pre>
 
// NAV LINKS
 
// NAV LINKS
 
// these links will appear in the end of the navbar
 
// these links will appear in the end of the navbar
Line 181: Line 196:
 
         'label' => 'logout'
 
         'label' => 'logout'
 
);
 
);
 +
</pre>
  
 +
==Navigation Pages==
  
 +
<pre>
 
// NAV PAGES
 
// NAV PAGES
 
// unless listed in this array, all pages will appear int he main nav
 
// unless listed in this array, all pages will appear int he main nav

Revision as of 12:07, 5 March 2008

This is the main settings file for each instance of ARK. The file is divide into sections as set out below

Links

This includes the server environment settings.

// Include settings related to your server environment
include('env_settings.php');

General

This sets the display name of the ARK instance. Used in page titles etc.

// The Ark name
$ark_name = 'FASTI admin';

The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)

// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
$ark_dir = '/v2/';
<pre>

A list of loaded modules
<pre>
//array of loaded modules
$loaded_modules = 
    array(
        'fst',
        'sea',
        'bib',
        'rpt',
        'abk',
);

A default itemkey. Not essential but handy in guessing the itemkey sometimes.

//  The default item key for this instance of Ark.
$default_itemkey = 'fst_cd';

Database

// DATABASE
// The mysql db name of this instance of ark
$ark_db = 'fasti_db2';
// The mysqlserver
$sql_server = 'localhost';
// The mysql user who will make all the db calls
$sql_user = 'sql_php_user';
// The mysql user's password
$sql_pwd = 'test';
// DSN (this shouldn;t need adjusting)
$dsn = 'mysql://'.$sql_user.':'.$sql_pwd.'@'.$sql_server.'/'.$ark_db;

Security

/*SECURITY
 *these are the names of the liveuser objects. They should be unique per ARK 
 *(to prevent cross ark hacking). They need to be called in the code as
 * $$liveuser and $$liveuser_admin
 */
$liveuser = $ark_name . 'usr';
$liveuser_admin = $ark_name . 'usr' . '_admin';
//the path to the login script (relative to the document root)
$loginScript = 'index.php';
//Anonymous Logins
//If these variables are set then you are allowing anonymous logins
//This is a security risk! Its best to leave these statements commented out.
//Bear in mind that this does not need to be a real user.
//$anonymous_login['username'] = 'anon';
//$anonymous_login['password'] = 'anon';

Skin

// SKIN
// Skin name
$skin = 'fasti';
// Skin path
$skin_path = "$ark_dir"."skins/$skin";

Forms

// FORMS
//Default year as a setting for form data entry
$default_year = '2005';
//Default site code
$default_site_cd = 'AIAC';

Viewers

// VIEWERS
// FIXME: make this an option of the table setup array
// Number of rows to display on the data viewer
$conf_viewer_rows = 15;
// Default Micro viewer page (used by search result handlers)
$conf_micro_viewer = $ark_dir."micro_view.php";
// 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";
//Default $output_mode for the data viewer
$default_output_mode = 'tbl';

Mapping

// MAPPING
// Path to clarent (web)
$clarent_path = "clarent/0_6/clarent";
// Path to data directory (server)
$ark_mapdata_dir = '/srv/www/htdocs/fasti/'.$ark_dir.'mapserver/data/';
// Path to temp directory (server)
$ark_maptemp_dir = '/srv/www/htdocs/fasti/'.$ark_dir.'mapserver/tmp/';
// Path to temp directory (web)
$ark_web_maptemp_dir = 'mapserver/tmp/';
// Default maptype (STU WHATS THIS)
$default_maptype = 1;
// Path to base_map (server)
$default_base_map = '/srv/www/htdocs/fasti/'.$ark_dir.'mapserver/mapfiles/base.map';
//$default_base_map = '/srv/www/htdocs/fasti/mapserver/base.map';
// Path to WMS mapfile (server)
$wms_map = '/srv/www/htdocs/fasti/'.$ark_dir.'mapserver/mapfiles/fasti_wms.map';
// Path to WFS mapfile (server)
$wfs_map = '/srv/www/htdocs/fasti/'.$ark_dir.'mapserver/mapfiles/fasti_wfs.map';
//spatial modules - these are the modules that have geometry
$spat_mods = array('cor');

Logging

// LOGGING
//Logging levels
$conf_log_add = 'on';
$conf_log_edt = 'on';
$conf_log_del = 'on';

Search Engine

// SEARCH ENGINE
// words to cut out of multi string searches
$conf_non_search_words = array('and', 'di', 'in');

Languages

// LANGUAGES
// The default lang
$default_lang = 'en';
// These are the languages in use (in order)
$conf_langs = array('en', 'it', 'ro', 'mk');

Fields

// FIELDS
include_once('field_settings.php');

Doctype

// DOCTYPE
// The doctype to use for web output
$doctype = "html \n
     PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n
     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"";

Navigation Links

// NAV LINKS
// these links will appear in the end of the navbar
$conf_linklist =
    array(
        'file' => 'index.php',
        'vars' => 'logout=true',
        'label' => 'logout'
);

Navigation Pages

// NAV PAGES
// unless listed in this array, all pages will appear int he main nav
$conf_hide_pages =
    array(
        'index.php',
        'record_view.php',
        'contact.php',
        'about.php',
        'search.php',
        'folder.php',
        'export.php'
);