This repository has been archived by the owner on Sep 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
155 lines (136 loc) · 6.91 KB
/
ext_localconf.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'LumIT.' . $_EXTKEY,
'Forum',
[
'ForumCategory' => 'list',
'Board' => 'show, markAsRead, subscribe',
'Topic' => 'show, showNewPost, new, create, edit, update, delete, pin, close, move, executeMove, split, executeSplit, join, executeJoin, subscribe',
'Post' => 'new, create, edit, update, delete, move, executeMove',
'Poll' => 'delete, vote',
'Attachment' => 'remove, download',
],
// non-cacheable actions
[
'ForumCategory' => 'list',
'Board' => 'show, markAsRead, subscribe',
'Topic' => 'show, showNewPost, new, create, edit, update, delete, pin, close, move, executeMove, split, executeSplit, join, executeJoin, subscribe',
'Post' => 'new, create, edit, update, delete, move, executeMove',
'Poll' => 'delete, vote',
'Attachment' => 'remove, download',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'LumIT.' . $_EXTKEY,
'Messages',
[
'Message' => 'inbox, outbox, new, send, delete, getAjaxReceivers'
],
//non-cacheable actions
[
'Message' => 'inbox, outbox, new, send, delete, getAjaxReceivers'
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'LumIT.' . $_EXTKEY,
'Statistics',
[
'Statistic' => 'infoCenter, statistics',
],
//non-cacheable actions
[
'Statistic' => 'infoCenter, statistics',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'LumIT.' . $_EXTKEY,
'Unread',
[
'Post' => 'listUnread',
],
//non-cacheable actions
[
'Post' => 'listUnread',
]
);
/**********************************
*
* SLOTS
*
**********************************/
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
/** Signal to send notifications to subscribers after topic creation */
$signalSlotDispatcher->connect(
\LumIT\Typo3bb\Domain\Model\Topic::class, 'afterCreation',
\LumIT\Typo3bb\Slot\EmailNotificationSlot::class, 'onTopicCreated'
);
/** Signal to send notifications to subscribers after post creation */
$signalSlotDispatcher->connect(
\LumIT\Typo3bb\Domain\Model\Post::class, 'afterCreation',
\LumIT\Typo3bb\Slot\EmailNotificationSlot::class, 'onPostCreated'
);
/** Signal to send notifications to message receivers after message creation */
$signalSlotDispatcher->connect(
\LumIT\Typo3bb\Domain\Model\Message::class, 'afterCreation',
\LumIT\Typo3bb\Slot\EmailNotificationSlot::class, 'onMessageCreation'
);
$signalSlotDispatcher->connect(
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, 'afterMappingSingleRow',
\LumIT\Typo3bb\Slot\ObjectCreationSlot::class, 'afterMappingSingleRow'
);
/******************************************
*
* HOOKS
*
******************************************/
// Hook after deletion of FrontendUsers in the backend
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \LumIT\Typo3bb\Hook\ProcessFrontendUsersHook::class;
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \LumIT\Typo3bb\Hook\ProcessFrontendUsersHook::class;
// Hook after deletion of Boards in the backend */
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \LumIT\Typo3bb\Hook\ProcessBoardsHook::class;
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \LumIT\Typo3bb\Hook\ProcessBoardsHook::class;
// Hook for calculating fe users total time logged in */
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'][$_EXTKEY] = \LumIT\Typo3bb\Hook\ProcessFrontendUsersHook::class;
// Hook for registering ke_search indexer for forum posts
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'][] = \LumIT\Typo3bb\Extensions\KeSearch\Indexer\ForumIndexer::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['customIndexer'][] = \LumIT\Typo3bb\Extensions\KeSearch\Indexer\ForumIndexer::class;
/******************************************
*
* CACHING FRAMEWORK
*
******************************************/
//Caching Framework
if( !is_array( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb'] ) ) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb'] = [];
}
if( !isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['frontend'] ) ) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['frontend'] = \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class;
}
if( !isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['backend'] ) ) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['backend'] = \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class;
}
if( !isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['options'] ) ) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['options'] = [ 'defaultLifetime' => 0 ];
}
if( !isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['groups'] ) ) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['typo3bb']['groups'] = [ 'system' ];
}
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sr_feuser_register')) {
// this sr_feuser_register hook implements uniqueness validation of username and tx_typo3bb_display_name among each other
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sr_feuser_register']['tx_srfeuserregister_pi1']['model'][] =
\LumIT\Typo3bb\Extensions\SrFeuserRegister\Hook\EvaluationHook::class;
// Before a frontendUser is deleted, all their topics and posts need to have their authorNames and editorNames set
// When a user profile is edited, the html signature needs to be sanitized
// When a new user is registered, the statistics need to be updated for daily registrations
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sr_feuser_register']['tx_srfeuserregister_pi1']['registrationProcess'][] =
\LumIT\Typo3bb\Extensions\SrFeuserRegister\Hook\RegistrationProcessHook::class;
}
// TYPO3 Queries lack the ability of counting queries with a statement set
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend::class] = [
'className' => \LumIT\Typo3bb\Xclass\Extbase\Persistence\Generic\Storage\Typo3DbBackend::class,
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['getQueryParts']['typo3bb'] = \LumIT\Typo3bb\Extensions\KeSearch\Hook\QueryPartsHook::class;