Download the PHP package nucleos/antispam-bundle without Composer
On this page you can find all versions of the php package nucleos/antispam-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nucleos/antispam-bundle
More information about nucleos/antispam-bundle
Files in nucleos/antispam-bundle
Package antispam-bundle
Short Description This bundle provides some basic features to reduce spam in symfony forms.
License MIT
Homepage https://nucleos.rocks
Informations about the package antispam-bundle
NucleosAntiSpamBundle
This bundle provides some basic features to reduce spam in Symfony.
Features
-
Honeypot protection for forms: An additional "hidden" (i.e. made invisible with CSS) field will be added to your form. Whoever fills out this field, is considered to be a spambot.
-
Time protection for forms: The time between displaying the form and submitting the form is measured. Anybody who submits the form quicker than a certain number of seconds, is considered to be a spambot. The timestamp is stored in the session.
- Email address obfuscation filter for Twig: To prevent spam harvest bots from detecting your email address, they are obfuscated by e.g. replacing
@
with[AT]
. The filter will find email addresses automatically, so you can apply it to your entire text.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Enable the Bundle
In older versions of Symfony, you need to enable it manually:
Usage
Form based protection
In a controller:
In a form class:
Twig email address obfuscation
The Twig filter antispam
replaces @
by e.g. [AT]
.
If you want a JavaScript decoding for the encoded email addresses, you should use the AntiSpam.js
library:
It is recommended to use webpack / webpack-encore
to include the JavaScript library in your page. This file is located in the assets
folder.
Configure the Bundle
Create a configuration file called nucleos_antispam.yaml
:
License
This bundle is under the MIT license.
All versions of antispam-bundle with dependencies
ext-pcre Version *
symfony/config Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/event-dispatcher Version ^6.4 || ^7.0
symfony/expression-language Version ^6.4 || ^7.0
symfony/form Version ^6.4 || ^7.0
symfony/framework-bundle Version ^6.4 || ^7.0
symfony/http-foundation Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^7.0
symfony/options-resolver Version ^6.4 || ^7.0
symfony/translation-contracts Version ^1.1 || ^2.0 || ^3.0
twig/twig Version ^2.4 || ^3.0