SpamSpan integration / Drupal 5 Port

mglanznig - February 14, 2007 - 21:42
Project:Email Field
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I created a patch to add support for the SpamSpan module (email obfuscator). The patch is created against 5.x-1.x-dev. Attention: The SpamSpan module has to be patched in order for this patch to work! See the corresponding issue there.

AttachmentSize
email_1.patch2.54 KB

#1

mglanznig - February 14, 2007 - 21:47
Title:SpamSpan integratoin» SpamSpan integration

typo. sorry.

#2

mh86 - February 15, 2007 - 08:19

Hi!
Thanks for your patch! Looks clean and this is certainly a great additional feature for the email module, but I'll wait until the SpamSpam module has applied the patch, then I'll integrate a SpamSpam formatter.

#3

emdalton - April 23, 2007 - 15:10

I applied both patches and I am still not seeing obfuscation in CCK email fields. I do see obfuscation in regular nodes in which an email address appears (except when the user has entered mailto tags).

#4

mglanznig - April 24, 2007 - 08:08

When you create an email field you should see at "Email Link Type": Mailto: Direct link with SpamSpan encryption (only if you have the SpamSpan module installed). You have to mark this radio button. If you are not seeing this option and have the SpamSpan module installed, then maybe the new dev version of email-field has changed its behaviour. I will look into this.

#5

emdalton - April 25, 2007 - 17:38

Thanks - since this was a field I had created prior to installing SpamSpan, I hadn't seen this option. I also had to go to the "Display Fields" tab and choose "Email-SpamSpan" under Teaser and Full, otherwise the email field was completely hidden.

It is all working correctly now, and I and my users thank you! Just a word of warning, though: users who enter email addresses already surrounded by "mailto" tags (e.g. if TinyMCE is installed/enabled and the user copies and pastes a formatted email address from another website or other data source) will find that those email addresses are not obfuscated. I don't know if it's feasible to fix this in the SpamSpan code, but users should be aware of the issue.

#6

mglanznig - April 27, 2007 - 18:35

I'm glad to hear that. Unfortunately I'm not the maintainer nor a developer of the SpamSpan-Module and I currently have no time to address this issue. I think you should create an issue with your findings in the SpamSpan-Issue queue. Maybe some other developer can fix this.

#7

flebas - May 12, 2007 - 10:46

Hello,
There is a typo in patch :

'mailto_encrypt_inivismail'

Works well. How to encrypt email addresses in views ?

Frederic

#8

flebas - May 12, 2007 - 10:54

I have found for email address in lists.

#9

mglanznig - May 13, 2007 - 13:52

Corrected. Thanks for your hint. There are so many 'i's in the name invisimail that it's easy to forget one. :-)

AttachmentSize
email_2.patch 2.54 KB

#10

tiziano - October 10, 2007 - 18:47

I just wrote some lines of code for integrate the email cck field with spamspan, and then I found this isssue...

However, my patch should work with the Spamspan current version (no more patch needed). So maybe someone could be interested on it...

AttachmentSize
email.module_0.patch 0 bytes

#11

tiziano - October 10, 2007 - 18:51

Here is the patch...

AttachmentSize
email.module_1.patch 1.28 KB

#12

masipila - October 13, 2007 - 12:15

I'm afraid the patch email.module_1.patch don't work as expected. The problem is here, if I'm not mistaken:

$mailto =  '<a href="mailto:'. $item['email']. '">'. check_plain($item['email']) .'</a>';
if (($field['widget']['link_type'] == 'mailto_spamspan' || $formatter == 'spamspan') && module_exists('spamspan')) {
  $mailto = spamspan($mailto, 1);
}

Here the spamspan function is not called with the plain email address as expected but with the email link including the anchor mailto: etc.

Attached is a patch where the code above is in format:

elseif (($field['widget']['link_type'] == 'mailto_spamspan' || $formatter == 'spamspan') && module_exists('spamspan')) {
  $mailto = spamspan(check_plain($item['email']), 1);
}
else {
  $mailto =  '<a href="mailto:'. $item['email']. '">'. check_plain($item['email']) .'</a>';
}

AttachmentSize
email.module_2.patch 1.49 KB

#13

tobiasb - March 10, 2009 - 09:58
Title:SpamSpan integration» SpamSpan integration / Drupal 5 Port
 
 

Drupal is a registered trademark of Dries Buytaert.