forked from kartolo/direct_mail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
125 lines (100 loc) · 5.79 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// registering icons
$iconProviderClassName = \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class;
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$icons = array(
'directmail-attachment' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/attach.gif'),
'directmail-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail.gif'),
'directmail-dmail-list' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail_list.gif'),
'directmail-folder' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/ext_icon_dmail_folder.gif'),
'directmail-category' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/icon_tx_directmail_category.gif'),
'directmail-mail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mail.gif'),
'directmail-mailgroup' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mailgroup.gif'),
'directmail-page-modules-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail.gif'),
'directmail-page-modules-dmail-inactive' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail__h.gif'),
'directmail-dmail-new' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/newmail.gif'),
'directmail-dmail-preview-html' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_html.gif'),
'directmail-dmail-preview-text' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_txt.gif'),
);
foreach ($icons as $identifier => $options) {
$iconRegistry->registerIcon($identifier, $iconProviderClassName, $options);
}
// Register jumpurl processing hook
// TODO: move hook to this one
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']['direct_mail'] = 'DirectMailTeam\\DirectMail\\Hooks\\JumpurlController->preprocessRequest';
//$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'][]='EXT:' . $_EXTKEY . '/Classes/Checkjumpurl.php:&DirectMailTeam\DirectMail\Checkjumpurl';
// Register hook for simulating a user group
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing']['direct_mail'] = 'DirectMailTeam\\DirectMail\\Hooks\TypoScriptFrontendController->simulateUsergroup';
// unserializing the configuration so we can use it here:
$extConf = unserialize($_EXTCONF);
/**
* Language of the cron task:
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['cron_language'] = $extConf['cron_language'] ? $extConf['cron_language'] : 'en';
/**
* Number of messages sent per cycle of the cron task:
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['sendPerCycle'] = $extConf['sendPerCycle'] ? $extConf['sendPerCycle'] : 50;
/**
* Default recipient field list:
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultRecipFields'] = 'uid,name,title,email,phone,www,address,company,city,zip,country,fax,firstname,first_name,last_name';
/**
* Additional DB fields of the recipient:
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['addRecipFields'] = $extConf['addRecipFields'];
/**
* Admin email for sending the cronjob error message
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['adminEmail'] = $extConf['adminEmail'];
/**
* Direct Mail send a notification every time a job starts or ends
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['notificationJob'] = $extConf['notificationJob'];
/**
* Interval of the cronjob
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['cronInt'] = $extConf['cronInt'];
/**
* Use HTTP to fetch contents
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['UseHttpToFetch'] = $extConf['UseHttpToFetch'];
/**
* Use implicit port in URL for fetching Newsletter-Content: Even if your TYPO3 Backend is on a non-standard-port, the URL for fetching the newsletter contents from one of your Frontend-Domains will not use the PORT you are using to access your TYPO3 Backend, but use implicit port instead (e.g. no explicit port in URL)
*/
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['UseImplicitPortToFetch'] = $extConf['UseImplicitPortToFetch'];
/**
* Enable the use of News plain text rendering hook:
*/
if ($extConf['enablePlainTextNews']) {
// Register tt_news plain text processing hook
$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraCodesHook'][] = 'DirectMailTeam\\DirectMail\\Hooks\\TtnewsPlaintextHook';
}
/**
* Registering class to scheduler
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['DirectMailTeam\\DirectMail\\Scheduler\\DirectmailScheduler'] = array(
'extension' => $_EXTKEY,
'title' => 'Direct Mail: Mailing Queue',
'description' => 'This task invokes dmailer in order to process queued messages.',
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['DirectMailTeam\\DirectMail\\Scheduler\\MailFromDraft'] = array(
'extension' => $_EXTKEY,
'title' => 'Direct Mail: Create Mail from Draft',
'description' => 'This task allows you to select a DirectMail draft that gets copied and then sent to the. This allows automatic (periodic) sending of the same TYPO3 page.',
'additionalFields' => 'DirectMailTeam\\DirectMail\\Scheduler\\MailFromDraftAdditionalFields'
);
// bounce mail per scheduler
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['DirectMailTeam\\DirectMail\\Scheduler\\AnalyzeBounceMail'] = array(
'extension' => $_EXTKEY,
'title' => 'Direct Mail: Analyze bounce mail',
'description' => 'This task will get bounce mail from the configured mailbox',
'additionalFields' => 'DirectMailTeam\\DirectMail\\Scheduler\\AnalyzeBounceMailAdditionalFields'
);
/**
* Added CLI
*/
$TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']['direct_mail'] = array('EXT:direct_mail/cli/cli_direct_mail.php','_CLI_direct_mail');