blueways / bw-captcha
支持音频的Captcha元素,适用于TYPO3表单组件。Captcha生成不依赖于Google或第三方集成。
4.1.2
2024-08-27 07:54 UTC
Requires
- php: ^8.1
- ext-gd: *
- typo3/cms-core: ^11.0 || ^12.0 || ^13.0
Requires (Dev)
- bk2k/bootstrap-package: dev-master
- friendsofphp/php-cs-fixer: ^3.12
- helhum/typo3-console: ^8.0
- roave/security-advisories: dev-latest
- saschaegerer/phpstan-typo3: ^1.9
- typo3/cms-base-distribution: ^12.0
- typo3/cms-lowlevel: ^12.0
- dev-main
- dev-development
- 9.x-dev
- 4.1.2
- 4.1.1
- 4.1.0
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.1.0
- v3.0.1
- v3.0.0
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.2
- v1.0.1
- dev-sf-event-mgt
- dev-fix-ter-release
- dev-renovate/typo3-cms-lowlevel-13.x
- dev-renovate/typo3-cms-base-distribution-13.x
- dev-french-sound
- dev-master
- dev-remove-lock
- dev-fix-error-log
- dev-update-quality-tools
- dev-link-gregwar-captcha
- dev-content-length-header
- dev-feature/audio-captcha
- dev-cache-headers
- dev-aria-properties
- dev-templateVariantV2
- dev-9.x-dev
- dev-feature/v12
This package is auto-updated.
Last update: 2024-09-14 14:31:41 UTC
README
TYPO3扩展 bw_captcha
此扩展为TYPO3表单组件添加了Captcha元素。Captcha生成使用Gregwar/Captcha,不包括Google或第三方。
安装
Composer
composer require blueways/bw-captcha
TER
从TYPO3扩展仓库(TER)下载zip文件。
使用方法
通过表单编辑器将Captcha元素添加到您的表单中,或直接添加到yaml表单中。
通过表单编辑器
或手动配置
renderables: - type: Captcha identifier: captcha label: Captcha properties: fluidAdditionalAttributes: required: required autocomplete: 'off'
配置
安装后,包含静态TypoScript模板或手动包含setup和constants。
要修改Captcha输出,您可以使用以下TypoScript constants
plugin.tx_bwcaptcha {
settings {
# Show reload button
refreshButton =
# Show audio button for speech output
audioButton =
# The length of the captcha
length =
# The charset of the captcha
charset =
# The width of the image
width =
# The height of the image
height =
# Custom font file(s) to use (comma-separated)
fontFiles =
# Text color (e.g. 255,0,0)
textColor =
# Line color (e.g. 0,0,0)
lineColor =
# Background color (e.g. 255,255,255)
backgroundColor =
# Distortion
distortion =
# The maximum number of lines to draw in front of
maxFrontLines =
# The maximum number of lines to draw behind
maxBehindLines =
# The maximum angle of char
maxAngle =
# The maximum offset of char
maxOffset =
# Is the interpolation enabled?
interpolation =
# Ignore all effects
ignoreAllEffects =
}
}
覆盖Captcha元素
要覆盖Captcha部分,将其复制到您的扩展中,并将部分路径添加到您的表单设置
TYPO3: CMS: Form: prototypes: standard: formElementsDefinition: Form: renderingOptions: partialRootPaths: 1680889288: 'EXT:your_ext/Resources/Private/Frontend/Partials/'
从版本3.x迁移到4.x
此版本旨在使解决Captcha更加容易。它引入了一个新的音频功能,可以读出当前的Captcha代码。已添加缺失的ARIA
属性。
- 查看新的Captcha部分
- 音频按钮默认启用(可以通过
plugin.tx_bwcaptcha.settings.audioButton
禁用)
从版本2.x迁移到3.x
Captcha生成移动到了中间件,这解决了许多缓存问题。因此,对表单元素部分进行了调整。如果您已修改部分,则需要更新图像标签和刷新按钮链接。
tl;dr:
- 查看新的Captcha部分
- 刷新按钮默认启用(可以通过
plugin.tx_bwcaptcha.settings.refreshButton
禁用) - 如果由于此元素而禁用了页面缓存,您可以重新启用页面缓存
故障排除
刷新按钮不工作
如果您的网站配置为使用尾部斜杠,则无法解析刷新URL。一个简单的修复方法是添加对页面类型3413的设置,例如。
routeEnhancers: PageTypeSuffix: type: PageType default: / index: index map: /: 0 .captcha: 3413 .audio: 3414
贡献
此扩展由Maik Schneider制作:请随时贡献!