2017 © Pedro Peláez
 

cakephp-plugin cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

image

mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  • Monday, July 2, 2018
  • by mirko-pagliai
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,616 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 20 % Grown

The README.md

reCAPTCHA Mailhide

Software License CI codecov Codacy Badge CodeFactor, (*1)

reCAPTCHA Mailhide is a CakePHP plugin that allows you to hide email addresses using reCAPTCHA. It works by using the crabstudio/Recaptcha plugin, which must first be loaded and configured correctly., (*2)

Did you like this plugin? Its development requires a lot of time for me. Please consider the possibility of making a donation: even a coffee is enough! Thank you., (*3)

Make a donation, (*4)

Installation

You can install the plugin via composer:, (*5)

$ composer require --prefer-dist mirko-pagliai/cakephp-recaptcha-mailhide

Then you have to load the plugin. For more information on how to load the plugin, please refer to the Cookbook., (*6)

Simply, you can execute the shell command to enable the plugin:, (*7)

bin/cake plugin load RecaptchaMailhide

This would update your application's bootstrap method., (*8)

Then you also need to set up a key to encrypt/decrypt email addresses:, (*9)

Configure::write('RecaptchaMailhide.encryptKey', 'thisIsAKeyForEncrypt12345678901234567890');

Installation on older CakePHP and PHP versions

Recent packages and the master branch require at least CakePHP 4.0 and PHP 7.2. Instead, the cakephp3 branch requires at least PHP 5.6., (*10)

In this case, you can install the package as well:, (*11)

$ composer require --prefer-dist mirko-pagliai/cakephp-recaptcha-mailhide:dev-cakephp3

Note that the cakephp3 branch will no longer be updated as of May 7, 2021, except for security patches, and it matches the 1.4.7 version., (*12)

Configuration

First, you have to load the Recaptcha component provided by the crabstudio/Recaptcha plugin, as described here. The component must be loaded inside the initialize() method of your AppController class., (*13)

For more information on how to load the component, please refer to the Cookbook., (*14)

Then, you have to load the Mailhide helper:, (*15)

$this->loadHelper('RecaptchaMailhide.Mailhide');

For more information on how to load the helper, please refer to the Cookbook., (*16)

Usage

You can now use the link() method provided by the Mailhide helper in your template files. Example:, (*17)

echo $this->Mailhide->link('My mail', 'myname@mymail.com');

This will create a link. By clicking on the link, a popup will open and it will contain the reCAPTCHA control. If the check was filled in correctly, the clear email will be shown., (*18)

You can also use the email address as the title of the link. Example:, (*19)

echo $this->Mailhide->link('myname@mymail.com', 'myname@mymail.com');

In this case, the email will be obfuscated (myn***@mymail.com) to be shown as the title of the link., (*20)

The third parameter of the method can be used for link options. Example:, (*21)

echo $this->Mailhide->link('My mail', 'myname@mymail.com', ['class' => 'my-custom-class']);

Versioning

For transparency and insight into our release cycle and to maintain backward compatibility, reCAPTCHA Mailhide will be maintained under the Semantic Versioning guidelines., (*22)

The Versions

02/07 2018

dev-develop

dev-develop https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

13/06 2018

dev-master

9999999-dev https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

27/04 2018

1.2.0

1.2.0.0 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

27/04 2018

dev-cakephp3.2

dev-cakephp3.2 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

27/04 2018

dev-cakephp3.6

dev-cakephp3.6 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

23/04 2018

1.1.1

1.1.1.0 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

12/01 2018

1.1.0

1.1.0.0 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

13/07 2017

1.0.0

1.0.0.0 https://github.com/mirko-pagliai/cakephp-recaptcha-mailhide

A CakePHP plugin that allows you to hide email addresses using reCAPTCHA

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai