Henriette

From ARK
Jump to: navigation, search

Setup

ms4w

This service has been installed on all the servers and the directory structure in the ms4w\Apache\htdocs folder is either 'projects' or 'students'. The 'students' folder is divided into the different students user names and the 'projects' folder is divided into the project names. From this follows that the portus project code is all in ms4w\Apache\htdocs\projects\portus_ark and my own sintana project is in ms4w\Apache\htdocs\students\hro106\sintana.


When setting up ms4w I have changed the LISTEN setting in ms4w\Apache\conf\httpd.conf from 80 to 8080 since most of the servers already had some other service running on 80. This means that the root of the server can be reached from http://localhost:8080 or the equivalent. So for the ay-dehus server the address is http://ay-dehus.soton.ac.uk:8080/ and then the folders which lead to the projects and the ark code.

MySQL

  1. Download MySQL from http://dev.mysql.com/downloads/mysql
  2. Install to c:\program files
  3. Configure to run:
    1. server machine
    2. multifunctional DB
    3. C: as installation path
    4. online transaction processing (oltp)
    5. enable tcp/ip networking on 3306 port
    6. enable strict mode
    7. multilanguage utf-8
    8. install as a windows service
    9. include bin directory
    10. set root passwork
    11. enable access from remote machines.
  4. Security considerations with mysql.
    1. You might need to allow port 3306 as an exeption through the firewall settings in windows for it to work.
    2. You might also want to change the root user and password for security reasons.
  5. Download phpmyadmin - the english version or multilanguage if you wish.
  6. Extract the zip folder to C:\ms4w\Apache\htdocs and maybe further into a folder system only you know for security reasons and rename the folder to just phpmyadmin without all the version numbers.
  7. To configure phpmyadmin copy the file config.sample.inc.php and rename the copy to config.inc.php and leave in the main phpmyadmin folder.
    1. Change the mysql database settings like host and stuff
    2. Add a blowfish secret - can be anything or just 'herfjke'
    3. And go to the phpmyadmin page in your browser http://localhost:8080/your_secret_foldersystem/phpmyadmin/ and login

ARK

Setup and settings files

This is all asuming that you are using the ms4w in windows as I know nothing of mac and such likes

  1. Get the newest version of the ARK code and pop it into the project folder. The ARK code for each project has been placed into the file directory of the ms4w\Apache\htdocs root folder under the relevant folder structure (in this case portus_ark which is located in C:\ms4w\Apache\htdocs\projects\portus_ark).
  2. Create a new database in mysql called portus_ark and import the ark database into here.
  3. Configure portus_ark\config\env_settings.php
    1. Set $doc_root = 'C:\ms4w\Apache\htdocs';
    2. Set $pear_path = ";C:\ms4w\Apache\php\PEAR"; which is where the PEAR library is likely to be. Remember to get the whole pear library.
    3. Set $ark_server_path = 'C:\ms4w\Apache\htdocs\projects\portus_ark'; This is the path to the project folder where all the ark code and index.php is situated.
  4. Configure portus_ark\config\settings.php
    1. $ark_name = 'Portus'; - the name you choose to give your project
    2. $ark_dir = '/projects/portus_ark/'; The online directory of your project
    3. $loaded_modules = array( 'cxt','sph'); The array of modules that you end up having and using in your project
    4. $default_itemkey = 'cxt_cd'; The main itemkey of you project e.i. the most important module in the project (in this case contexts)
    5. Database setup - to access mysql
      1. $ark_db = 'portus_ark'; Database name
      2. $sql_server = 'localhost'; Will prob always be the same
      3. $sql_user = 'root'; Is originally root or which ever username you choose to give it
      4. $sql_pwd = 'your password';
    6. $default_year = '2007';
    7. $default_site_cd = 'PORT07'; Your special site code which will be placed in front of all module key values.
    8. Mapping settings - is related to the clarent setup later - you don't need to change these settings now but can wait untill you setup the other spatial stuff.
      1. $ark_mapdata_dir = $doc_root.$ark_dir.'data/mapping/'; - the directory you create for all your mapping files
      2. $default_base_map = $doc_root.$ark_dir.'mapserver/mapfiles/portus.map'; Your default base mapfile - see setup later of clarent and mapfile
      3. $spat_mods = array('cxt', 'sfi'); The modules that have geometry attached
      4. $loaded_map_mods = array( 'cor', 'cxt', 'sfi'); The modules to load in the map
    9. $default_lang = 'en';
    10. It is also in the settings file that you setup the left panels for microview and data entry:
      1. $data_entry_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=cxt_cd", 'text' => 'Context Register'); Copy this and change for each bit the item_key and view and text. The view can be regist (register), detfrm (data entry form) or something else refering to an optional view (e.g. materi).
      2. $micro_view_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?item_key=cxt_cd", 'text' => 'View Context'); For the microview you only need to change the text and the item_key.

Module setup

When you want to create a new module you should have a good think about weather it is infact something which needs a module for itself or if it could be a module type of another module. For example a bit of special ceramic and peice of metal don't need to have each their module as they are both really the same thing and can both be a type of the module 'special finds'. In this example I will setup a new module for special finds (in short form sfi) with a couple of different module types (modtypes) like ceramics, marble and metal.

In all the stuff we are creating now everytime it says 'sfi' this must be changed to your unique module short form

Module in database

  1. In the database (portus_ark) create a new table called sfi_tbl_sfi with the fields. This table will be fileld automatically with all the instances of the module
    1. sfi_cd - varchar(30)
    2. sfi_no - int(10)
    3. ste_cd - varchar(10)
    4. modtype - int(3) - is optional and only needed if the module is going to have modtypes like this one
    5. cre_by - int(4)
    6. cre_on - datetime
  2. If using modtypes you also need to create this next table which we will call sfi_lut_sfitype - in this table you must also each module type.
    1. id - int(11) - Will fill in automatically
    2. sfi_type - varchar(255) - e.g. ceramics, metal or marble
    3. cre_by - int(11) - Fill in your number
    4. cre_on - datetime - Can set to NOW
  3. Now go to cor_tbl_module and setup your new module
    1. id = automatically
    2. itemkey = sfi_cd
    3. name = mod_sfi
    4. shortform = sfi
    5. description = The special finds module
    6. cre_by = 1 (or your number)
    7. cre_on = NOW
  4. Again if using modtypes go to cor_tbl_col and enter this
    1. id = automatically
    2. dbname = sfitype
    3. description = types of special finds
    4. cre_by = 1 (or your number)
    5. cre_on = NOW
  5. Last but not least you must go to cor_tbl_alias and enter the aliases for your types, module and the module type.
    1. id = automatically
    2. alias = Special finds
    3. aliastype = 1 (1 is normal)
    4. language = en ( for english)
    5. itemkey = sfi_lut_sfitype, cor_tbl_module or cor_tbl_col
    6. itemvalue = the id number of the item in the original table. For examle if the module sfi is listed as id=5 in tbl_cor_module the itemkey is tbl_cor_module and the itemvalue is 5.
    7. cre_by = 1 (or your number)
    8. cre_on = NOW

If you wish to have aliases in other languages you must create first the original alias (i.e. the english one) and then create a new alias instance with the same itemkey and itemvalue as the first but with a different language (e.g. it for italian).

Module settings file

Create a copy of the example module settings file and call it mod_sfi_settings.php and begin with changing all the module shortforms for the module set in the example file to sfi. Don't change all the module shortforms you see - they might be for links and stuff with other modules.

The settings file begins with some custom fields settings. Normally all field setting sshould go to the field_settings.php file from where they can all be reused in other modules. However a few are very module specific and should be set in the modules own settings file.

   $conf_field_itemkey =
   array(
       'dataclass' => 'itemkey',
       'classtype' => 'sfi_cd', //this is needed to correctly request the qtype
       'alias_tbl' => 'cor_tbl_module',
       'alias_col' => 'itemkey',
       'alias_src_key' => 'sfi_cd',
       'alias_type' => '1',
       'module' => 'sfi',
       'editable' => TRUE,
       'hidden' => FALSE,
       'add_validation' => $key_add_validation,
       'edt_validation' => $key_edt_validation 
         );

The itemkey field allows you to access the alias and information about the module itself.

   $conf_field_cxtxmi = 
   array(
       'dataclass' => 'xmi',
       'classtype' => 'xmi_list',
       'alias_tbl' => 'cor_tbl_module',
       'alias_col' => 'itemkey',
       'alias_src_key' => 'cxt_cd',
       'alias_type' => '1',
       'module' => 'sfi',
       'op_xmi_mod' => 'cxt',
       'op_xmi_itemkey' => 'cxt_cd',
       'editable' => TRUE,
       'hidden' => FALSE,
       'add_validation' => $xmi_add_validation,
       'edt_validation' => $xmi_edt_validation 
         );

The xmi fields allows for the links between the different modules.

Clarent

  1. Create a new database in mysql for clarent - I called my ark database portus_ark and the clarent database for portus i called portus_clarent.
  2. Import the clarent database
  3. Create a datafolder into the project folder: portus_ark\data\mapping where you want to put the maps and other data for the project.
  4. Create a mapfile and put it into portus_ark\mapserver\mapfiles - see more on mapfiles later. The mapfile is only used for the clarent main map while the smaller maps attached to the modules use map settings in the ark database.
  5. In portus_ark\clarent\06\clarent\settings.php
    1. Change all directories to fit the new project
    2. Point clarent default map to your new mapfile
    3. Change DB settings and point to your new clarent DB portus_clarent
    4. Set mapextent to the same as in the mapfile

Different servers

ay-dehus

ay-scribe

my laptop

Portus_ark

Sintana_ark

  • txttypes
    • placename - 74
    • production - 75
    • period - 45
    • construction - 76
    • condition - 62
    • colour - 5
    • glasstype - 77
    • nasmantype - 78
    • eggerstype - 79
    • straumetype - 80
    • bibtitle - 88
    • bibtown - 87
    • bibseries - 86
    • journaltitle - 85
    • journalnr - 84
    • journalpages - 83
    • authorln - 81
    • authorfn - 82
  • numbertypes
    • rouendfac - 1
    • ovalfac - 2
    • height - 3
    • rimdia - 4
  • sintypes
    • glass - 7
    • glassproduction - 8
    • bowl - 9
  • actiontypes
    • regto - 12
  • datetypes
    • regon - 10
    • bibyear - 8