Download the PHP package silverstripe-terraformers/turnstile-captcha without Composer

On this page you can find all versions of the php package silverstripe-terraformers/turnstile-captcha. 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 turnstile-captcha

Silverstripe Turnstile CAPTCHA

Adds a "spam protection" field to SilverStripe userforms using Cloudflare's Turnstile CAPTCHA service.

Requirements

Installation

After installing the module via composer or manual install you must set the spam protector to TurnstileCaptchaProtector, this needs to be set in your site's config file normally this is mysite/_config/config.yml.

Finally, add the "spam protection" field to your form by calling enableSpamProtection() on the form object.

Configuration

Set the site_key and the secret_key via environment variables.

You can get these from your cloudflare account refer to the turnstile documentation.

There are some optional configuration settings that can be added to your site's yaml config (typically this is mysite/_config/config.yml).

TurnstileCaptchaField uses Guzzle to communicate with cloudflare. If you would like to change http connection settings (Eg proxy settings) you can configure your own HttpClient class via injector

Adding field labels

If you want to add a field label or help text to the TurnstileCaptchaField field you can do so like this:

Commenting Module

When your using the silverstripe/comments module you must add the following (per their documentation) to your _config.php in order to use Terraformers\TurnstileCaptcha on comment forms.

Render type

By default, the turnstyle widget will be rendered automatically. To change this you can set the render type.

This can be configured site-wide using the Config API

Or on a per form basis:

With this configuration you will need to add your own javascript to render the widget. Refer to the cloudflare documentation for details.

Reporting an issue

When you're reporting an issue please ensure you specify what version of SilverStripe you are using i.e. 3.1.3, 3.2beta, master etc. Also be sure to include any JavaScript or PHP errors you receive, for PHP errors please ensure you include the full stack trace. Also please include how you produced the issue. You may also be asked to provide some of the classes to aid in re-producing the issue. Stick with the issue, remember that you seen the issue not the maintainer of the module so it may take allot of questions to arrive at a fix or answer.


All versions of turnstile-captcha with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-intl Version *
silverstripe/framework Version ^5.0
silverstripe/spamprotection Version ^4
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 silverstripe-terraformers/turnstile-captcha contains the following files

Loading the files please wait ....