-
Notifications
You must be signed in to change notification settings - Fork 3
/
ext_localconf.php
109 lines (102 loc) · 4.15 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
<?php
declare(strict_types=1);
use T3\PwComments\Hooks\ProcessDatamap;
use TYPO3\CMS\Backend\Controller\PageLayoutController;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use T3\PwComments\Controller\CommentController;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use T3\PwComments\Event\Listener\PageLayoutView;
/* | This extension is made for TYPO3 CMS and is licensed
* | under GNU General Public License.
* |
* | (c) 2011-2022 Armin Vieweg <[email protected]>
* | 2015 Dennis Roemmich <[email protected]>
* | 2016-2017 Christian Wolfram <[email protected]>
* | 2023 Malek Olabi <[email protected]>
*/
if (!defined('TYPO3')) {
die('Access denied.');
}
(static function ($extensionKey): void {
ExtensionUtility::configurePlugin(
$extensionKey,
'show',
[
CommentController::class => 'index,upvote,downvote',
],
[
CommentController::class => 'index,upvote,downvote',
]
);
ExtensionUtility::configurePlugin(
$extensionKey,
'new',
[
CommentController::class => 'new,create,confirmComment',
],
[
CommentController::class => 'new,create,confirmComment',
]
);
ExtensionUtility::configurePlugin(
$extensionKey,
'Pi2',
[
CommentController::class => 'sendAuthorMailWhenCommentHasBeenApproved',
],
[
CommentController::class => 'sendAuthorMailWhenCommentHasBeenApproved',
]
);
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['PwComments']['modules']
= $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['PwComments']['plugins'];
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'] = array_merge(
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'],
[
'tx_pwcomments_show',
'tx_pwcomments_show[controller]',
'tx_pwcomments_show[action]',
'tx_pwcomments_show[comment]',
'tx_pwcomments_show[commentToReplyTo]',
'tx_pwcomments_show[hash]',
'tx_pwcomments_show[__referrer][@extension]',
'tx_pwcomments_show[__referrer][@vendor]',
'tx_pwcomments_show[__referrer][@controller]',
'tx_pwcomments_show[__referrer][@action]',
'tx_pwcomments_show[__referrer][arguments]',
'tx_pwcomments_show[__referrer][@request]',
'tx_pwcomments_show[__trustedProperties]',
'tx_pwcomments_show[newComment][authorName]',
'tx_pwcomments_show[newComment][authorMail]',
'tx_pwcomments_show[authorWebsite]',
'tx_pwcomments_show[newComment][message]',
'tx_pwcomments_show[newComment][parentComment][__identity]',
'tx_pwcomments_new',
'tx_pwcomments_new[controller]',
'tx_pwcomments_new[action]',
'tx_pwcomments_new[comment]',
'tx_pwcomments_new[commentToReplyTo]',
'tx_pwcomments_new[hash]',
'tx_pwcomments_new[__referrer][@extension]',
'tx_pwcomments_new[__referrer][@vendor]',
'tx_pwcomments_new[__referrer][@controller]',
'tx_pwcomments_new[__referrer][@action]',
'tx_pwcomments_new[__referrer][arguments]',
'tx_pwcomments_new[__referrer][@request]',
'tx_pwcomments_new[__trustedProperties]',
'tx_pwcomments_new[newComment][authorName]',
'tx_pwcomments_new[newComment][authorMail]',
'tx_pwcomments_new[authorWebsite]',
'tx_pwcomments_new[newComment][message]',
'tx_pwcomments_new[newComment][parentComment][__identity]'
]
);
// After save hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
ProcessDatamap::class;
})('pw_comments');