-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathext_localconf.php
More file actions
executable file
·64 lines (55 loc) · 2.68 KB
/
ext_localconf.php
File metadata and controls
executable file
·64 lines (55 loc) · 2.68 KB
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
<?php
use Psr\Log\LogLevel;
use Sitegeist\ImageJack\Hook\TsfeHook;
use Sitegeist\ImageJack\Templates\AvifTemplate;
use Sitegeist\ImageJack\Templates\JpegTemplate;
use Sitegeist\ImageJack\Templates\PngTemplate;
use Sitegeist\ImageJack\Templates\WebpTemplate;
use Sitegeist\ImageJack\Xclass\LocalDriver;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Log\Writer\FileWriter;
use TYPO3\CMS\Core\Utility\GeneralUtility;
defined('TYPO3') || die();
call_user_func(function () {
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Sitegeist']['ImageJack']['writerConfiguration'] = [
// configuration for ERROR level log entries
LogLevel::DEBUG => [
// add a FileWriter
FileWriter::class => [
// configuration for the writer
'logFileInfix' => 'image_jack'
],
]
];
if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['image_jack']['useLiveProcessing'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processors']['ImageJackProcessor'] = [
'className' => Sitegeist\ImageJack\Processor\ImageJackProcessor::class,
'before' => ['LocalImageProcessor']
];
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['image_jack']['templates']['jpegOptimizer'] =
JpegTemplate::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['image_jack']['templates']['pngOptimizer'] =
PngTemplate::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['image_jack']['templates']['webpConverter'] =
WebpTemplate::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['image_jack']['templates']['avifConverter'] =
AvifTemplate::class;
if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['image_jack']['useFallbackDriver'])) {
if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers']['Local'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers']['Local']['class']] = [
'className' => LocalDriver::class
];
}
if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers']['AusDriverAmazonS3'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers']['AusDriverAmazonS3']['class']] = [
'className' => 'Sitegeist\ImageJack\Xclass\AmazonS3Driver'
];
}
$version = GeneralUtility::makeInstance(Typo3Version::class);
if ($version->getMajorVersion() < 13) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['createHashBase'][] =
TsfeHook::class . '->postProcessHashBase';
}
}
});