WARNING: concrete5 5.6 and earlier are end-of-life. Sales from the marketplace have now ended. Click here to learn more about this transition.
Overview
Encrypted E-Mail Address for Concrete5 allows you to publish e-mail addresses on your site without them being visible in the page source (mark-up). Both server- and client-side scripting work together to provide protection from e-mail address harvesters, thereby giving you peace of mind and affording visitors the convenience of simply clicking a link and using their preferred mail program to compose a message.
This package contains 2 components. The first is a standard Concrete5 block with a simple user interface allowing for one-off placement of encrypted addresses on any page. No special knowledge is required to use the block. The second component is a developer API which allows theme and add-on developers to take advantage of the same strong encryption algorithm with a simple method call from PHP code. Some knowledge of PHP and Concrete5 development is desirable to use the API.
Features + Benefits
User Interface
Simply enter the address to encrypt, or alternatively, enter the user name of someone in your Concrete5 user database. With the latter (look-up) approach, the email address will always reflect the address currently stored for that user. If the email address in the user's account is changed, the new address is automatically displayed by the block. Optionally make the address a link and specify the default subject and body for the message. Provide some context for additional customization. The preview updates as you type. Just click the preview link to test.
Developer API
For additional flexibility, an API is provided for add-on and theme developers. Encrypting an address programmatically is a simple matter of instantiating a class and passing in the address.
$js = 'eea.min.js';
$addr = 'address@domain.com';
$pkgHdl = 'pmw_encrypted_email_address';
// Include the required JavaScript
$hh = Loader::helper('html');
$this->addHeaderItem($hh->javascript($js,$pkgHdl));
// Load the required PHP class
Loader::library('eea',$pkgHdl);
// Output the encrypted address
echo new PmwEncryptedEmailAddress($addr);
// Additional options can also be specified
$opts = array(
'isLink'=> 1,
'subj'=> 'Web Inquiry',
'body'=> 'Details of inquiry...',
'text'=> 'contact us',
'attr'=> 'title="Send message"'
);
echo new PmwEncryptedEmailAddress($addr,$opts);