(Fixed in 7.x beta 4)
Wouldn't it be nice if one could change the "[dot]" replacement text in the filter configuration form, like for the "[at]" replacement text ? And maybe one day make these texts translation-aware ?
Because in other countries, people not always understand even simple english words as "at" or "dot"... We in France have "arobase" for "at" in email addresses, as an example. See the matter ?

Thanks a lot and have nice Drupal hacking...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osopolar’s picture

Version: 6.x-1.2 » master

+ subscribing

And may you also add a option that allows to show a help which says "replace [at] by @ and [dot] by ." and hide this help with js. ... otherwise I don't think my grand parents will be able to send me a mail ;)

naught101’s picture

+1, if only because I want to remove the spaces...

pentike’s picture

Status: Active » Patch (to be ported)
FileSize
1.29 KB

Hi!

This patch adds a field to the admin page where the user can set the "[dot]" text just like the "[at]".

The patch is against 5.x-1.4
Hope it will be useful :)

Cheers, Gábor
www.zeneszapro.hu

naught101’s picture

Status: Patch (to be ported) » Needs work
FileSize
1.35 KB

Thanks Gábor,

I'm working on getting this to work with drupal six, and it does when javascript is off, but when it's on, it doesn't replace the new "." replacement properly (because it's looking for "[dot]" instead).

here's the .module patch for 6.x, I'll see if I can fix the js problem.

naught101’s picture

Status: Needs work » Needs review
FileSize
3.93 KB

Ok, this patch also draws the spamspan_dot variable into Drupal.settings.spamspan.p (for period, or point), and uses that in the javascript file to create a regex string to to be replaced (globally).

I tried to re-compress the .js, but it didn't end up on a single line... anyway, it works now.

pentike’s picture

FileSize
5.15 KB

Hi!

I have backported your patch to 5.x-1.4, but found that when the replacement string contains some regex characters [ ] { }, the js fails.
I found a code at http://simonwillison.net/2006/Jan/20/escape/ what escapes these strings properly. Maybe this would be a nice functionality in core as well (maybe it's already there, but i could not find it).

This patch is for 5.x-1.4

Cheers, Gábor
www.zeneszapro.hu

naught101’s picture

I can't get that to work for 6, probably because I don't know much javascript, and I'm doing something wrong.

Also, you need to switch these lines around:

                .replace(/\s+/g, '');
                .replace(dot_regex, '.')

Otherwise if the regex has a space in it, it won't match.

Einkahumor’s picture

+1 on [dot] replacement and translation support. Getting that committed to the 6.x and 7.x versions would make this module very, very neat.

Vayira’s picture

This is very necessary to make the module useful in different languages [dot] doesn't mean anything in Spanish.

osopolar’s picture

Version: master » 6.x-1.x-dev
FileSize
6.05 KB

Based on the patch in #6 of pentike I created a new one for drupal 6.

atumosucav’s picture

Version: 6.x-1.x-dev » 7.x-1.1-beta1

+1

fox mulder’s picture

Hi all!

I have made a patch for D7 to solve this problem. I'm not a programmer, use the patch your own risk (works for me). Any suggestions are welcome.

My motivation: if the site mail contains more dots ( e.g. some.thing [at] so.me.thing ) and this mail address appears on a lots of, or all pages of the site, than google understands the word 'dot' as the one of the most important keyword. Overwriting the 'dot' provides a chance to use relevant keyword instead of 'dot'.

PS: Use #13 instead of this...

fox mulder’s picture

This version of the latest patch contains an admin setting page to set the default dot replacement ( /admin/config/content/spamspan )

peterx’s picture

I added code to beta 4 from the site I am working on. You can replace the dot in the filter page where you change the @.

peterx’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)