spam

Posted by: 
Dominique De Cooman

Here is an example on how to obscure email addresse (or other tekst) using http://drupal.org/project/signwriter in a formatter. You can use it on the cck field overview as a formatter (or in display suite).

<?php
//cck formatters
/**
 * Implementation of hook_field_formatter_info(),.
 */
function your_module_field_formatter_info() {
  return array(
    
'text_as_image' => array(?>

Obscure email addresses in drupal using signwriter

Signwriter is a Drupal module that allows you to use TrueType fonts to replace text in headings, menu's etc.
It does this by replacing text with an image from the TrueType font file. This enables you to obscure email addresses, by replacing them with an image.

http://www.commonplaces.com/resources/blog/using-signwriter-obscure-emai...

Posted by: 
Dominique De Cooman

This module turns dominique@dominiquedecooman.com into

<a href="mailto:&#100&#111&#109&#105&#110&#105&#113&#117&#101&#64&#100&#111&#109&#105&#110&#105&#113&#117&#101&#100&#101&#99&#111&#111&#109&#97&#110&#46&#99&#111&#109">

in the html code. Preventing your email being harvested by spammers.

The code in the module can be found on http://drupal.org/node/151638
I just put it in a little module ready to be downloaded and installed.

Subscribe to spam