Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(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...
Comment | File | Size | Author |
---|---|---|---|
#13 | spamspan-7.x-dot_default_setting-344833-13.patch | 7.32 KB | fox mulder |
#12 | spamspan-7.x-dot_setting-344833-12.patch | 4.8 KB | fox mulder |
#10 | spamspan-dot-344833-10.patch | 6.05 KB | osopolar |
#6 | spamspan.patch | 5.15 KB | pentike |
#5 | spamspan.patch | 3.93 KB | naught101 |
Comments
Comment #1
osopolar+ 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 ;)
Comment #2
naught101 CreditAttribution: naught101 commented+1, if only because I want to remove the spaces...
Comment #3
pentike CreditAttribution: pentike commentedHi!
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
Comment #4
naught101 CreditAttribution: naught101 commentedThanks 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.
Comment #5
naught101 CreditAttribution: naught101 commentedOk, 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.
Comment #6
pentike CreditAttribution: pentike commentedHi!
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
Comment #7
naught101 CreditAttribution: naught101 commentedI 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:
Otherwise if the regex has a space in it, it won't match.
Comment #8
Einkahumor CreditAttribution: Einkahumor commented+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.
Comment #9
Vayira CreditAttribution: Vayira commentedThis is very necessary to make the module useful in different languages [dot] doesn't mean anything in Spanish.
Comment #10
osopolarBased on the patch in #6 of pentike I created a new one for drupal 6.
Comment #11
atumosucav CreditAttribution: atumosucav commented+1
Comment #12
fox mulder CreditAttribution: fox mulder commentedHi 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...
Comment #13
fox mulder CreditAttribution: fox mulder commentedThis version of the latest patch contains an admin setting page to set the default dot replacement ( /admin/config/content/spamspan )
Comment #14
peterx CreditAttribution: peterx commentedI 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 @.
Comment #15
peterx CreditAttribution: peterx commented