Download the PHP package kreativsoehne/magento2-simple-antispam without Composer

On this page you can find all versions of the php package kreativsoehne/magento2-simple-antispam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-simple-antispam

magento-2-simple-antispam

A customizeable and simple Magento 2 extension for blocking (russian) spam bots creating new customer accounts.

installation

1. $ composer require kreativsoehne/magento2-simple-antispam
2. $ ./bin/magento module:enable KuS_Antispam
3. $ ./bin/magento setup:upgrade
4. $ ./bin/magento setup:di:compile
5. Profit.

usage

This extension is very simple. By default it won't perform a registration request when some registration fields contain special strings on a blacklist:

$spamContent = array(
    "http://",
    "https://",
    "www.",
    ".com",
    ".de",
    ".ru",
    ".cn",
    ".net"
);

default registration fields:

$formFieldsToCheck = array(
    'firstname',
    'lastname'
);

You can change the whole extension behaviour by your need. Just edit this file:

./Plugin/Customer/Controller/Account/CreatePostPlugin.php

how it works

It's a simple interceptor plugin which wraps the \Magento\Customer\Controller\Account\CreatePost::Execute() method into an around method. It will serach all specified form fields for the spam content by a simple iteration. The original Execute() method will only be called if there was no spam string detected.

Notice:

This Extension is meant to be used as a skeleton by developers. It is very primitive and may need customization. When installing via Composer, further upgrades will eliminiate your customizations. Make sure to write an interceptor plugin by yourself, don't upgrade or use it as a local extension in the /app/code/ folder.

Propably there will be a future version, capable of defining blacklisted strings and form fields via Magento Admin when there's a demand for it. Just let us know or make the neccesary changey by yourself and leave a pull request. We're happy about every contribution :)


All versions of magento2-simple-antispam with dependencies

PHP Build Version
Package Version
Requires magento/framework Version ^101.0|^102.0
php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kreativsoehne/magento2-simple-antispam contains the following files

Loading the files please wait ....