blueways/bw-captcha

支持音频的Captcha元素,适用于TYPO3表单组件。Captcha生成不依赖于Google或第三方集成。

安装次数: 137,063

依赖者: 0

建议者: 0

安全性: 0

星星: 6

关注者: 5

分支: 6

开放问题: 6

类型:typo3-cms-extension


README

Extension icon

TYPO3扩展 bw_captcha

Latest version Supported TYPO3 versions Total downloads TYPO3 extension Composer

此扩展为TYPO3表单组件添加了Captcha元素。Captcha生成使用Gregwar/Captcha,不包括Google或第三方。

Frontend Captcha example

安装

Composer

composer require blueways/bw-captcha

TER

TER version

TYPO3扩展仓库(TER)下载zip文件。

使用方法

通过表单编辑器将Captcha元素添加到您的表单中,或直接添加到yaml表单中。

通过表单编辑器

Captcha via Form Editor

或手动配置

renderables:
  - type: Captcha
    identifier: captcha
    label: Captcha
    properties:
      fluidAdditionalAttributes:
        required: required
        autocomplete: 'off'

配置

安装后,包含静态TypoScript模板或手动包含setupconstants

要修改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制作:请随时贡献!

感谢bluewaysXIMA