forked from einpraegsam/captcha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
executable file
·49 lines (46 loc) · 2.25 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
<?php
defined('TYPO3_MODE') or die('Access denied.');
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['captcha'] = 'EXT:captcha/Resources/Public/Scripts/captcha.php';
$_EXTCONF = unserialize($_EXTCONF); // unserializing the configuration so we can use it here
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY] = array(
'useTTF' => (int)($_EXTCONF['useTTF']) ? 1 : 0,
'sessionHandler' => (int)($_EXTCONF['usePHPsession']) ? 'ThinkopenAt\Captcha\SessionHandler\PhpSessionHandler' : 'ThinkopenAt\Captcha\SessionHandler\Typo3SessionHandler',
'imageHeight' => (int)($_EXTCONF['imgHeight']) ? : 35,
'imageWidth' => (int)($_EXTCONF['imgWidth']) ? : 135,
'captchaLength' => (int)($_EXTCONF['captchaChars']) ? : 5,
'noNumbers' => (int)($_EXTCONF['noNumbers']) ? true : false,
'noLower' => (int)($_EXTCONF['noLower']) ? true : false,
'noUpper' => (int)($_EXTCONF['noUpper']) ? true : false,
'letterSpacing' => (int)($_EXTCONF['letterSpacing']) ? : 10,
'fontSize' => (int)($_EXTCONF['fontSize']) ? : 16,
'fontFile' => trim($_EXTCONF['fontFile']) ? : PATH_site . 'typo3conf/ext/captcha/Resources/Private/Fonts/vera.ttf',
'bold' => (int)($_EXTCONF['bold']) ? true : false,
'angle' => (int)($_EXTCONF['angle']) ? : 35,
'diffx' => (int)($_EXTCONF['diffx']) ? : 0,
'diffy' => (int)($_EXTCONF['diffy']) ? : 2,
'xpos' => (int)($_EXTCONF['xpos']) ? : 3,
'ypos' => (int)($_EXTCONF['ypos']) ? : 4,
'noises' => (int)($_EXTCONF['noises']) ? : 6,
'backgroundColor' => trim($_EXTCONF['backcolor']) ? : '#f4f4f4',
'textColor' => trim($_EXTCONF['textcolor']) ? : '#000000',
'obfuscateColor' => trim($_EXTCONF['obfusccolor']) ? : '#828482',
'excludeChars' => trim($_EXTCONF['excludeChars']) ? : '',
);
call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
'captcha_login',
'auth',
\ThinkopenAt\Captcha\Service\CaptchaService::class,
[
'title' => 'CaptchaService',
'description' => 'Frontend login captcha check',
'subtype' => 'processLoginDataFE',
'available' => true,
'priority' => 70,
'quality' => 70,
'os' => '',
'exec' => '',
'className' => \ThinkopenAt\Captcha\Service\CaptchaService::class,
]
);
});