定制 meteo-concept/hiddenfieldantispam-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

meteo-concept/hiddenfieldantispam-bundle

最新稳定版本:v1.3.0

Composer 安装命令:

composer require meteo-concept/hiddenfieldantispam-bundle

包简介

A Symfony bundle to add a hidden field antispam mechanism in all forms

README 文档

README

This bundle adds into each form a hidden field with an empty value. If the field comes back with a non-empty value, then we assume that the form was filled in by a bot and the form is rejected.

Installation

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

$ composer require meteo-concept/hiddenfieldantispam-bundle

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Install the bundle with one of the commands above. You now have to enable it and configure it without the recipe.

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    MeteoConcept\HiddenFieldAntispamBundle\MeteoConceptHiddenFieldAntispamBundle::class => ['all' => true],
];

Configuration

Configure the bundle, for instance in config/packages/meteo_concept_hidden_field_antispam.yml:

meteo_concept_hidden_field_antispam:
    enabled: true # this is the default
    field_name: "meteo_concept_sentinel" # this is the default

twig:
    form_themes:
        - '@MeteoConceptHiddenFieldAntispam/hidden_field_antispam_form.html.twig' # to hide the antispam field

Usage

You have nothing else to do, the field is automatically added to all root (i.e. non-embedded forms).

Todo

  • Randomize the field name, just in case bots would become smart
  • More advanced, randomize the field type while leaving it invisible

统计信息

  • 总下载量: 110
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固