2017 © Pedro Peláez
 

craft-plugin craft-emailobfuscator

A simple plugin that adds a twig tag to obfuscate email addresses (by rot13) in text fields.

image

lucasbares/craft-emailobfuscator

A simple plugin that adds a twig tag to obfuscate email addresses (by rot13) in text fields.

  • Friday, April 6, 2018
  • by lucasbares
  • Repository
  • 1 Watchers
  • 2 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 114 % Grown

The README.md

Email obfuscator plugin for Craft CMS 3.x

A simple plugin that adds a twig tag to obfuscate email addresses (by ROT13) in text fields., (*1)

Plugin Logo, (*2)

Requirements

This plugin is made for Craft CMS 3.0.0-beta.23 or later. It requires the Email-Obfuscator by Propaganistas since this plugin is merely a wrapper for his Twig Extension., (*3)

Installation

To install the plugin, follow these instructions., (*4)

  1. Open your terminal and go to your Craft project:, (*5)

    cd /path/to/project
  2. Then tell Composer to load the plugin:, (*6)

    composer require lucasbares/craft-emailobfuscator
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft Emailobfuscator., (*7)

You can also update your craft's composer.json file and run composer update., (*8)

Using the Plugin

This plugin adds the Twig Extension made by Propaganistas to Craft. It masks all email addresses by ROT13 ciphering or CSS reverse text direction. A simple javascript file decodes the masked emails on the frontend., (*9)

To use it, just use the obfuscateEmail Twig filter on any text field or string:, (*10)

{{ "Sample Text"|obfuscateEmail }}
{{ textfield|obfuscateEmail }}

Configuring the Plugin

InludeJS

By default the plugin inserts the necessary JavaScript to your front end html. There is a setting to turn this off if you want to include the JS code manually. The relevant JS code is available at https://github.com/Propaganistas/Email-Obfuscator/tree/master/assets, (*11)

Craft 4 - Migration to Craft-Obfuscator

Unfortunately, I will not update this plugin for Craft 4. @Miranj has a plugin with almost the same functionality. To use it with the same twig filters and make the transition more easy, I wrote a small module which you can install., (*12)

Install migration module

  1. Copy the migration module into craft/modules
  2. Uninstall this plugin :( and install Craft-Obfuscator
  3. Update your site to Craft 4
  4. Update your composer.json to autoload the module (see example file in folder) and run composer dump-autoload -a
  5. Now your templates should work againg ;)

Credits

  • Propaganistas for developing this great Twig Extension
  • nystudio107 for providing great articles on Craft3 plugin development

Brought to you by Lucas Bares, (*13)

The Versions

06/04 2018

dev-master

9999999-dev

A simple plugin that adds a twig tag to obfuscate email addresses (by rot13) in text fields.

  Sources   Download

MIT

The Requires

 

mail email cms spam robots privacy craftcms craft-plugin craft obfuscator spam-protection craft emailobfuscator rot13

07/03 2018

2.0.0-beta.1

2.0.0.0-beta1

A simple plugin that adds a twig tag to obfuscate email addresses (by rot13) in text fields.

  Sources   Download

MIT

The Requires

 

mail email cms spam robots privacy craftcms craft-plugin craft obfuscator spam-protection craft emailobfuscator rot13