Download the PHP package pessek/elgg_recaptcha without Composer

On this page you can find all versions of the php package pessek/elgg_recaptcha. 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 elgg_recaptcha

Elgg Recaptcha

Protect forms with Googles Recaptcha

This plugin provides recaptcha verification that is configurable for specific actions. Actions can be selected through plugin settings. The form for the action will have a recaptcha inserted in the .elgg-foot div if it exists, or just above the last submit input.

Caveat: This only works for a form/action pair that follow the standard Elgg pattern using elgg_view_form()

In addition to the standalone usage, this plugin provides a simple view for programmatically inserting a captcha, and a function for validating the response.

Installation

Unzip/clone to the mod directory of your Elgg installation.

Sign up for google recaptcha and generate a public/private key pair at https://www.google.com/recaptcha/admin/create

Enable the plugin, enter the keys in the settings, select default rendering settings.

Advanced Usage

A recaptcha can be inserted into any markup with a view

echo elgg_view('input/recaptcha');

No parameters are necessary, if none are passed the recaptcha will render with the default options stored in the plugin settings. Parameters explicitly passed override defaults.

Optional parameters for the view are:

theme: The visual design of the recaptcha ('light' | 'dark')
size: The size of the recaptcha ('normal' | 'compact')
type: Type of challenge to perform ('image' | 'audio')
form: jquery selector of a form to position the recaptcha in eg. '.elgg-form-register'

To validate an action use the function

\Beck24\ReCaptcha\validate_recaptcha();

This function simply returns boolean whether the captcha response is valid. Usage may look something like this

// In our action file or action hook
if (!\Beck24\ReCaptcha\validate_recaptcha()) {
    // invalid recaptcha
    elgg_make_sticky_form('my/form');
    register_error(elgg_echo('elgg_recaptcha:message:fail'));
    forward(REFERER);
}

// we passed, proceed with the action

All versions of elgg_recaptcha with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
composer/installers Version ~1.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 pessek/elgg_recaptcha contains the following files

Loading the files please wait ....