forked from phth/agora
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_tables.php
executable file
·121 lines (113 loc) · 4.96 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'AgoraTeam.' . $_EXTKEY,
'web',
'forum',
'',
array(
'ForumAdmin' => 'list, new, create, edit, update, statistic,delete',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_forum.xlf',
)
);
}
/*-----------------------------------------------------------------------
* Register plugins
*----------------------------------------------------------------------*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Forum',
'Forum'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Widgets',
'Widgets'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Forumpages',
'Forumpages'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Forumsearch',
'Forumsearch'
);
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_widgets';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_widgets.xml'
);
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_forumpages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_forumpages.xml'
);
/*-----------------------------------------------------------------------
* Add static files
*----------------------------------------------------------------------*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript/Main',
'Agora - TYPO3 Forum'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript/ExampleTemplate',
'Agora - TYPO3 Forum - Bootstrap Theme'
);
/*-----------------------------------------------------------------------
* AddLLrefForTCAdescr
*----------------------------------------------------------------------*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_forum',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_forum.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_thread',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_thread.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_post',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_post.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_votinganswer',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_votinganswer.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_vote',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_vote.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_attachment',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_attachment.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_agora_domain_model_voting',
'EXT:agora/Resources/Private/Language/locallang_csh_tx_agora_domain_model_voting.xlf'
);
/*-----------------------------------------------------------------------
* AllowTablesOnStandardPages
*----------------------------------------------------------------------*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_forum');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_thread');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_post');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_view');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_vote');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_votinganswer');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_attachment');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_agora_domain_model_voting');