forked from AOEmedia/Realurl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_tables.php
executable file
·100 lines (90 loc) · 2.86 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
if (TYPO3_MODE=='BE') {
// t3lib_extMgm::addModule('tools','txrealurlM1','',t3lib_extMgm::extPath($_EXTKEY).'mod1/');
// Add Web>Info module:
t3lib_extMgm::insertModuleFunction(
'web_info',
'tx_realurl_modfunc1',
t3lib_extMgm::extPath($_EXTKEY) . 'modfunc1/class.tx_realurl_modfunc1.php',
'LLL:EXT:realurl/locallang_db.xml:moduleFunction.tx_realurl_modfunc1',
'function',
'online'
);
}
if (version_compare(TYPO3_branch, '6.1', '<')) {
t3lib_div::loadTCA('pages');
}
$TCA['pages']['columns'] += array(
'tx_realurl_pathsegment' => array(
'label' => 'LLL:EXT:realurl/locallang_db.xml:pages.tx_realurl_pathsegment',
'displayCond' => 'FIELD:tx_realurl_exclude:!=:1',
'exclude' => 1,
'config' => array (
'type' => 'input',
'max' => 255,
'eval' => 'trim,nospace,lower'
),
),
'tx_realurl_pathoverride' => array(
'label' => 'LLL:EXT:realurl/locallang_db.xml:pages.tx_realurl_path_override',
'exclude' => 1,
'config' => array (
'type' => 'check',
'items' => array(
array('', '')
)
)
),
'tx_realurl_exclude' => array(
'label' => 'LLL:EXT:realurl/locallang_db.xml:pages.tx_realurl_exclude',
'exclude' => 1,
'config' => array (
'type' => 'check',
'items' => array(
array('', '')
)
)
),
'tx_realurl_nocache' => array(
'label' => 'LLL:EXT:realurl/locallang_db.xml:pages.tx_realurl_nocache',
'exclude' => 1,
'config' => array (
'type' => 'check',
'items' => array(
array('', ''),
),
),
)
);
$TCA['pages']['ctrl']['requestUpdate'] .= ',tx_realurl_exclude';
$TCA['pages']['palettes']['137'] = array(
'showitem' => 'tx_realurl_pathoverride'
);
if (t3lib_div::compat_version('4.3')) {
t3lib_extMgm::addFieldsToPalette('pages', '3', 'tx_realurl_nocache', 'after:cache_timeout');
}
if (t3lib_div::compat_version('4.2')) {
// For 4.2 or new add fields to advanced page only
t3lib_extMgm::addToAllTCAtypes('pages', 'tx_realurl_pathsegment;;137;;,tx_realurl_exclude', '1', 'after:nav_title');
t3lib_extMgm::addToAllTCAtypes('pages', 'tx_realurl_pathsegment;;137;;,tx_realurl_exclude', '4,199,254', 'after:title');
}
else {
// Put it for standard page
t3lib_extMgm::addToAllTCAtypes('pages', 'tx_realurl_pathsegment;;137;;,tx_realurl_exclude', '2', 'after:nav_title');
t3lib_extMgm::addToAllTCAtypes('pages', 'tx_realurl_pathsegment;;137;;,tx_realurl_exclude', '1,5,4,199,254', 'after:title');
}
t3lib_extMgm::addLLrefForTCAdescr('pages','EXT:realurl/locallang_csh.xml');
$TCA['pages_language_overlay']['columns'] += array(
'tx_realurl_pathsegment' => array(
'label' => 'LLL:EXT:realurl/locallang_db.xml:pages.tx_realurl_pathsegment',
'exclude' => 1,
'config' => array (
'type' => 'input',
'max' => 255,
'eval' => 'trim,nospace,lower'
),
),
);
t3lib_extMgm::addToAllTCAtypes('pages_language_overlay', 'tx_realurl_pathsegment', '', 'after:nav_title');
?>