Download the PHP package lucasbares/craft-emailobfuscator without Composer
On this page you can find all versions of the php package lucasbares/craft-emailobfuscator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lucasbares/craft-emailobfuscator
More information about lucasbares/craft-emailobfuscator
Files in lucasbares/craft-emailobfuscator
Package craft-emailobfuscator
Short Description A simple plugin that adds a twig tag to obfuscate email addresses (by rot13) in text fields.
License MIT
Informations about the package craft-emailobfuscator
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.
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.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require lucasbares/craft-emailobfuscator
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft Emailobfuscator.
You can also update your craft's composer.json
file and run composer update
.
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.
To use it, just use the obfuscateEmail
Twig filter on any text field or string:
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
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.
Install migration module
- Copy the migration module into
craft/modules
- Uninstall this plugin :( and install Craft-Obfuscator
- Update your site to Craft 4
- Update your
composer.json
to autoload the module (see example file in folder) and runcomposer dump-autoload -a
- 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