Initial commit - Typo3 11.5.41

This commit is contained in:
Matteo Gallo
2026-07-03 17:53:31 +02:00
commit 5ca4743197
6811 changed files with 568848 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
/**
* An array consisting of implementations of middlewares for a middleware stack to be registered
*
* 'stackname' => [
* 'middleware-identifier' => [
* 'target' => classname or callable
* 'before/after' => array of dependencies
* ]
* ]
*/
return [
'frontend' => [
'sjbr/sr-freecap/eidsr' => [
'target' => \SJBR\SrFreecap\Middleware\EidHandler::class,
'after' => [
'typo3/cms-frontend/tsfe',
'typo3/cms-frontend/authentication',
'typo3/cms-frontend/backend-user-authentication',
'typo3/cms-frontend/site',
]
]
]
];

View File

@@ -0,0 +1,13 @@
# Configuration/Services.yaml
services:
_defaults:
autowire: true
autoconfigure: true
public: false
SJBR\SrFreecap\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*'
SJBR\SrFreecap\Configuration\ConfigurationHelper:
public: true

View File

@@ -0,0 +1,5 @@
<?php
defined('TYPO3') or die();
// Register SrFreecap static template
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('sr_freecap', 'Configuration/TypoScript', 'freeCap CAPTCHA');

View File

@@ -0,0 +1,9 @@
## Configuring the Font Maker backend module
module.tx_srfreecap {
## Paths for backend templates
view {
templateRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Templates/
partialRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Partials/
layoutRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Layouts/
}
}

View File

@@ -0,0 +1,73 @@
plugin.tx_srfreecap {
# cat=plugin.tx_srfreecap/dims/02; type=int+; label= CAPTCHA image height: Height of the generated image.
imageHeight = 90
# cat=plugin.tx_srfreecap/dims/03; type=int+; label= CAPTCHA image additional width: The width, in pixels, of the generated image is based on the maximum possible length of the word plus the value of this property.
imageAdditionalWidth = 30
# cat=plugin.tx_srfreecap/dims/04; type=int+; label= The horizontal (X) starting position of the word relative to the left of the image, in pixels.
textHorizontalPosition = 1
# cat=plugin.tx_srfreecap/dims/05; type=int+; label= The vertical (Y) starting position of the word relative to the top of the image, in pixels.
textVerticalPosition = 15
# cat=plugin.tx_srfreecap/dims/01; type=int[5-50]; label= Maximun word length: Maximun length of the randomly generated CAPTCHA string.
maxWordLength = 5
# cat=plugin.tx_srfreecap/color; type=boolean; label= Color of the text: 0=one random colour for all letters, 1=different random colour for each letter.
textColor = 0
# cat=plugin.tx_srfreecap/color; type=int[0-255]; label= Maximum darkness of the text color: The lower the number, the darker the color of the text may be.
colorMaximumDarkness = 5
# cat=plugin.tx_srfreecap/color; type=int[0-255]; label= Maximum lightness of the text color: The higher the number, the lighter the color of the text may be.
colorMaximumLightness = 50
# cat=plugin.tx_srfreecap//03; type=options[png,gif,jpg]; label= CAPTCHA image format: Format of the generated image.
imageFormat = png
# cat=plugin.tx_srfreecap/enable/01; type=boolean; label= Use list of words: If enabled, the CAPTCHA string will be selected from a list of words. If not, it will be randomly generated.
useWordsList = 0
# cat=plugin.tx_srfreecap/enable/02; type=boolean; label= Generate CAPTCHA with numbers only. This option is ignored if Use list of words is enabled.
generateNumbers = 0
# cat=plugin.tx_srfreecap//01; type=int+; label= Maximun attempts: Maximum times a user can refresh the image.
maxAttempts = 100
# cat=plugin.tx_srfreecap//04; type=options[,Transparent,White with grid,White with squiggles,Morphed image blocks]; label= Background type: If not set, will be random selection of possible types.
backgroundType = White with grid
# cat=plugin.tx_srfreecap/enable/04; type=boolean; label= Background blurring: If enabled, the background will be blurred. The string should be easier to read.
backgroundBlur = 1
# cat=plugin.tx_srfreecap/enable/05; type=boolean; label= Background morphing: If enabled, the background will be morphed (recommended).
backgroundMorph = 0
# cat=plugin.tx_srfreecap/enable/06; type=boolean; label= Merge string with background: 0=write CAPTCHA string over background, 1=merge CAPTCHA string with non-transparent background.
mergeWithBackground = 0
# cat=plugin.tx_srfreecap//05; type=string; label= Text morphing factor: Morphing factor applied to each character of the CAPTCHA string.
morphFactor = 0.1
# cat=plugin.tx_srfreecap/file/01; type=file[]; label= Default words list file: All words lists should be in the same directory.
defaultWordsList = EXT:sr_freecap/Resources/Private/Captcha/Words/default_freecap_words
# cat=plugin.tx_srfreecap//02; type=options[,formal,informal]; label= Type of salutation to use: Possible values are 'formal' or 'informal'.
salutation =
# cat=plugin.tx_srfreecap/file/02; type=string; label= List of GD font files: Coma-separated list of GD font files located in directory uploads/tx_srfreecap/ or in some extension directory using the usual syntax EXT:extensionKey/etc.
fontFiles =
# cat=plugin.tx_srfreecap/enable/03; type=boolean; label= Accessible output: If enabled, the CAPTCHA will include an audio version.
accessibleOutput = 0
# cat=plugin.tx_srfreecap/file/03; type=string; label= Accessible output image: File name of the accessible output image. If null, a textual message is used.
accessibleOutputImage = EXT:sr_freecap/Resources/Public/Images/audio.png
view {
# cat=plugin.tx_srfreecap/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:sr_freecap/Resources/Private/Partials/
}
}

View File

@@ -0,0 +1,66 @@
## Configuring the frontend rendering
plugin.tx_srfreecap {
settings {
imageHeight = {$plugin.tx_srfreecap.imageHeight}
imageAdditionalWidth = {$plugin.tx_srfreecap.imageAdditionalWidth}
imageFormat = {$plugin.tx_srfreecap.imageFormat}
textHorizontalPosition = {$plugin.tx_srfreecap.textHorizontalPosition}
textVerticalPosition = {$plugin.tx_srfreecap.textVerticalPosition}
backgroundType = {$plugin.tx_srfreecap.backgroundType}
backgroundBlur = {$plugin.tx_srfreecap.backgroundBlur}
backgroundMorph = {$plugin.tx_srfreecap.backgroundMorph}
maxWordLength = {$plugin.tx_srfreecap.maxWordLength}
useWordsList = {$plugin.tx_srfreecap.useWordsList}
generateNumbers = {$plugin.tx_srfreecap.generateNumbers}
colorMaximumDarkness = {$plugin.tx_srfreecap.colorMaximumDarkness}
colorMaximumLightness = {$plugin.tx_srfreecap.colorMaximumLightness}
textColor = {$plugin.tx_srfreecap.textColor}
mergeWithBackground = {$plugin.tx_srfreecap.mergeWithBackground}
morphFactor = {$plugin.tx_srfreecap.morphFactor}
defaultWordsList = {$plugin.tx_srfreecap.defaultWordsList}
fontFiles = {$plugin.tx_srfreecap.fontFiles}
maxAttempts = {$plugin.tx_srfreecap.maxAttempts}
accessibleOutput = {$plugin.tx_srfreecap.accessibleOutput}
accessibleOutputImage = {$plugin.tx_srfreecap.accessibleOutputImage}
salutation = {$plugin.tx_srfreecap.salutation}
}
view {
partialRootPaths {
0 = EXT:sr_freecap/Resources/Private/Partials/
1 = {$plugin.tx_srfreecap.view.partialRootPath}
}
}
_CSS_DEFAULT_STYLE (
.tx-srfreecap-captcha label { display: inline-block; width: 150px; }
img.tx-srfreecap-image { margin-left: 1em; margin-right: 1em; vertical-align: middle; }
.tx-srfreecap-image-accessible {
background-color: transparent;
vertical-align: middle;
}
.tx-srfreecap-accessible-link { width: 10em; float: right; vertical-align: middle; margin-right: 7em; }
.tx-srfreecap-cant-read { display: inline-block; width: 150px; }
.tx-srfreecap-cant-read a:link { background-color:transparent; font-weight:bold; text-decoration:none; }
)
}
## Backward pi_base compatibility
plugin.tx_srfreecap_pi2 {
_CSS_DEFAULT_STYLE (
.tx-srfreecap-pi1-captcha label { display: inline-block; width: 150px; }
img.tx-srfreecap-pi1-image { margin-left: 1em; margin-right: 1em; vertical-align: middle; }
.tx-srfreecap-pi1-image-accessible {
background-color: transparent;
vertical-align: middle;
}
.tx-srfreecap-pi1-accessible-link { width: 10em; float: right; vertical-align: middle; margin-right: 7em; }
.tx-srfreecap-pi1-cant-read { display: inline-block; width: 150px; }
.tx-srfreecap-pi1-cant-read a:link { background-color:transparent; font-weight:bold; text-decoration:none; }
)
}