blueways/bw-captcha
Composer 安装命令:
composer require blueways/bw-captcha
包简介
Captcha element with audio support for TYPO3 form components. The captcha generation does not rely on Google or third-party integrations.
关键字:
README 文档
README
TYPO3 extension bw_captcha
This extension adds a captcha element for the TYPO3 form component. The captcha generation uses Gregwar/Captcha, no Google or 3rd party includes.
Install
Composer
composer require blueways/bw-captcha
TER
Download the zip file from TYPO3 extension repository (TER).
Usage
Add the captcha element via Form Editor to your form or directly to your yaml form.
Via Form Editor
Or manual configuration
renderables: - type: Captcha identifier: captcha label: Captcha properties: fluidAdditionalAttributes: required: required autocomplete: 'off'
Configuration
Via Site Set (recommended)
Include the site set blueways/bw-captcha in your site configuration.
To modify the captcha output, use the site settings module and adjust the settings in the "Accessible Form Captcha" section.
Via TypoScript
Alternatively, include the static TypoScript template or include setup and constants manually.
To modify the captcha output, you can use the following 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 =
}
}
Usage in other Extensions
sf_event_mgt
To use the captcha element in the sf_event_mgt extension, you need to include the captcha partial in your custom event Registration template and activate the sfEventMgt feature in the extension settings:
<f:form>
...
+ <f:render partial="Registration/Captcha/BwCaptcha.html" arguments="{_all}" />
</f:form>
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['bw_captcha']['sfEventMgt'] = 1;
Overriding the captcha element
To override the captcha partial, copy it to your extension and add the partial path to your form setup:
TYPO3: CMS: Form: prototypes: standard: formElementsDefinition: Form: renderingOptions: partialRootPaths: 1680889288: 'EXT:your_ext/Resources/Private/Frontend/Partials/'
Migration from version 4.x to 5.x
In this version the inline JavaScript has been moved to a separate file to better comply with a Content Security Policy (CSP). If you dynamically load or display the captcha element, you probably need to initialize the captcha manually:
window.BwCaptcha.init();
Make sure the JavaScript file is included in your page: EXT:bw_captcha/Resources/Public/JavaScript/Frontend/Captcha.js
Migration from version 3.x to 4.x
This version aims to make solving the captcha more accessible. It introduces a new audio feature that reads out the
current captcha code. Missing ARIA properties have been added.
- Check out the new captcha partial
- Audio button is enabled by default (can be disabled via
plugin.tx_bwcaptcha.settings.audioButton)
Migration from version 2.x to 3.x
The generation of the captcha moved to a middleware, which solves a lot of caching issues. Therefore, adjustments to the form element partial have been made. If you've modified the partial, you need to update the image tag and refresh button link.
tl;dr:
- Check out the new captcha partial
- Reload button is enabled by default (can be disabled via
plugin.tx_bwcaptcha.settings.refreshButton) - You can re-enable the page cache, if disabled it because of this element
Troubleshooting
Refresh button not working
If your site is configured to use trailing slashes, the refresh url cannot be resolved. A simple fix is to add a setting for the pageType 3413, e.g.:
routeEnhancers: PageTypeSuffix: type: PageType default: / index: index map: /: 0 .captcha: 3413 .audio: 3414
License
This project is licensed under GNU General Public License 2.0 (or later).
Contribute
This extension was made by Maik Schneider: Feel free to contribute!
blueways/bw-captcha 适用场景与选型建议
blueways/bw-captcha 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 313.18k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2021 年 06 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「typo3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 blueways/bw-captcha 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 blueways/bw-captcha 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 blueways/bw-captcha 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Set Links with a specific language parameter
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
An interactive tour through the TYPO3 backend.
Define your own css rule-sets for the TYPO3 CMS backend.
TYPO3 Solrfal: Support for renaming files
GitHub Webhook Listener which releases TYPO3 extensions to TER when tags are created
统计信息
- 总下载量: 313.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-06-09

