961b62fe62ed713b25d94d57b6b90b60e53d4ba0
[TYPO3CMS/Extensions/static_info_tables.git] / ext_localconf.php
1 <?php
2 if (!defined ('TYPO3_MODE')) die ('Access denied.');
3
4
5 if (!defined ('STATIC_INFO_TABLES_EXTkey')) {
6 define('STATIC_INFO_TABLES_EXTkey',$_EXTKEY);
7 }
8
9 if (!defined ('PATH_BE_staticinfotables')) {
10 define('PATH_BE_staticinfotables', t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey));
11 }
12
13 if (!defined ('PATH_BE_staticinfotables_rel')) {
14 define('PATH_BE_staticinfotables_rel', t3lib_extMgm::extRelPath(STATIC_INFO_TABLES_EXTkey));
15 }
16
17 if (!defined ('DIV_EXTkey')) {
18 define('DIV_EXTkey','div');
19 }
20
21 if (t3lib_extMgm::isLoaded(DIV_EXTkey)) {
22 if (!defined ('PATH_BE_div')) {
23 define('PATH_BE_div', t3lib_extMgm::extPath(DIV_EXTkey));
24 }
25 }
26
27 $_EXTCONF = unserialize($_EXTCONF); // unserializing the configuration so we can use it here:
28
29 if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset'])) {
30 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset'] = $_EXTCONF['charset'] ? $_EXTCONF['charset'] : 'utf-8';
31 }
32
33 $labelTable = array(
34 'static_territories' => array(
35 'label_fields' => array( // possible label fields for different languages. Default as last.
36 'tr_name_##', 'tr_name_en',
37 ),
38 'isocode_field' => array(
39 'tr_iso_##',
40 ),
41 ),
42 'static_countries' => array(
43 'label_fields' => array(
44 'cn_short_##', 'cn_short_en',
45 ),
46 'isocode_field' => array(
47 'cn_iso_##',
48 ),
49 ),
50 'static_country_zones' => array(
51 'label_fields' => array(
52 'zn_name_##', 'zn_name_local',
53 ),
54 'isocode_field' => array(
55 'zn_code', 'zn_country_iso_##',
56 ),
57 ),
58 'static_languages' => array(
59 'label_fields' => array(
60 'lg_name_##', 'lg_name_en',
61 ),
62 'isocode_field' => array(
63 'lg_iso_##', 'lg_country_iso_##',
64 ),
65 ),
66 'static_currencies' => array(
67 'label_fields' => array(
68 'cu_name_##', 'cu_name_en',
69 ),
70 'isocode_field' => array(
71 'cu_iso_##',
72 ),
73 ),
74 'static_markets' => array(
75 'label_fields' => array(
76 'institution_description',
77 ),
78 'isocode_field' => array(
79 'institution_description',
80 ),
81 ),
82 );
83
84 if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'])) {
85 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = array_merge ($labelTable, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']);
86 } else {
87 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = $labelTable;
88 }
89
90 require_once(t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey).'class.tx_staticinfotables_div.php');
91
92 ?>