forked from kartolo/direct_mail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
112 lines (89 loc) · 4.95 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
<?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'];
/**
* 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'
);
/**
* Added CLI
*/
$TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']['direct_mail'] = array('EXT:direct_mail/cli/cli_direct_mail.php','_CLI_direct_mail');