Elxis CMS Forum

Support => Technical support => Topic started by: owl on August 25, 2008, 16:08:25

Title: Disable SPAM-protection?
Post by: owl on August 25, 2008, 16:08:25
Hi,

every time, I'm trying to post a mailto-Link which contains more than the usual 'mailto:name@company.de' (e.g. 'mailto:name@company.de%3E?subject=My%20wonderful%20Subject') the Spam-protection produces crap, means: no page is displayed anymore.... This subject & body-stuff is strictly needed in this project. So, is it somehow possible to disable the SPAM-protection?

Best regards,
Sandra

Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 16:10:54
Hi ,
Disable Email Cloaking from the bots  :)
Title: Re: Disable SPAM-protection?
Post by: owl on August 25, 2008, 16:27:47
Ah, wonderful. Thank you very much. I just had a look into "configuration" :-)

Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 16:31:40
You are welcome, Enjoy using ELXIS  ;)
Title: Re: Disable SPAM-protection?
Post by: owl on August 25, 2008, 17:20:14
Ah. Now is the problem finally resolved. If you want to use 'mailto:Name%20LastName%20%3Cname@company.de%3E?subject=This%20is%20a%20test&body=Just%20another%20testmessage.'  , you have to disable SEF-bot, too. Otherwise the %20 will be replaced with whitespaces etc. pp
Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 17:26:48
This is not an Elxis related problem , %20 is a known code for browsers to find spaces in the URLs.
Title: Re: Disable SPAM-protection?
Post by: owl on August 25, 2008, 17:30:43
Yeah, but normally it's not parsed in the <body><a href="mailto:..."></body>-section of a page, is it?... Well, it works in our "old" CMS-which-is-not-really-a-CMS...

(disabled tiny mce seems to be a MUST - SOMETIMES-, too)
Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 17:34:41
I don't understand , You mean that you can't apply this code in the contents?
Title: Re: Disable SPAM-protection?
Post by: owl on August 25, 2008, 17:51:31
Exactly. With enabled SEF, the Sitecode looks like this:
"<a href="mailto:Name LastName <name@company.de>?subject=This is a test&amp;body=Just another testmessage.">TEST</a>"

instead of:
"<a href="mailto:Name%20LastName%20%3Cname@company.de%3E?subject=This%20is%20a%20test&amp;body=Just%20another%20testmessage.">TEST</a>"

If you're using in the mailto-Link Stuff like Linebreaks(%0A%0D), Whitespaces(%20) etc. or even umlauts, they 're broken (e.g. "ß" will become "?")
Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 17:54:40
Disable the Editor from the Global Configuration , and then try to put the HTML code in your content , test it again and tell me the result :)
Title: Re: Disable SPAM-protection?
Post by: owl on August 25, 2008, 18:09:45
SEF on, tiny MCE off, result: FAIL <a href="mailto:Name LastName <name@company.de>?subject=This is a test&amp;body=Just another testmessage.">TEST</a>
SEF off, tiny MCE on, result: FAIL<a href="mailto:Name%20LastName%20%3Cname@company.de%3E?subject=This%20is%20a%20test&amp;body=Just%20another%20testmessage.">TEST</a>     
(inserted via "add Link"-Button)
SEF off, tiny MCE on, result: FAIL <a href="mailto:Name%20LastName%20%3Cname@company.de%3E?subject=This%20is%20a%20test&amp;body=Just%20another%20testmessage.">TEST</a>
(inserted via "edit HTML"-Button)
SEF off, tiny MCE off, result: OK <a href="mailto:Name%20LastName%20%3Cname@company.de%3E?subject=This%20is%20a%20test&body=Just%20another%20testmessage.">TEST</a>

- out of office till tomorrow morning -
Title: Re: Disable SPAM-protection?
Post by: Farhad Sakhaei on August 25, 2008, 18:12:35
Ok , I'll consider this issue  :)
Title: Re: Disable SPAM-protection?
Post by: datahell on August 26, 2008, 00:00:15
I would n't insert e-mail links this way. This is a direct link to user's e-mail client but user might has not an e-mail client. A lot of people use yahoo, msn, etc and not outlook, thunderbird etc. I advice you to display a link to a contact item in order for the visitor to use the Elxis contact form. Also never post e-mail addresses on your site if you don't want to fill your mailbox with spam.
Title: Re: Disable SPAM-protection?
Post by: owl on August 26, 2008, 15:22:44
Yeah, normally I wouldn't insert e-Mail links this way, too, but in this project it's strictly needed... (Mails need a special formatting, only this text, etc...)
Title: Re: Disable SPAM-protection?
Post by: owl on August 28, 2008, 13:52:00
Gnah, the "Convert URLs - Yes"-Part of Tiny MCE produces those "broken" mailto-Links  :o (additional to SEF-Bot)
Title: Re: Disable SPAM-protection?
Post by: datahell on August 28, 2008, 15:35:04
OK, I will make you a special bot for this purpose.
I will attach the bot here in a few hours.
Please wait.
Title: Re: Disable SPAM-protection?
Post by: datahell on August 28, 2008, 17:13:47
Here is your bot:
http://www.elxis-downloads.com/extensions/communication/advanced-email.html (http://www.elxis-downloads.com/extensions/communication/advanced-email.html)
Title: Re: Disable SPAM-protection?
Post by: nikos65 on August 29, 2008, 00:31:51
I find the Advanced e-mail bot very useful and i like it a lot  :)

I test it and gives me this at the address of outlook express " Nikos  <nikos&#64;email.gr> " and i can t send email !!

Title: Re: Disable SPAM-protection?
Post by: datahell on August 29, 2008, 11:27:21
I did this because of the E-mail Cloaking bot.
How to fix/change this:

- Unpublish e-mail cloacking bot.
- open file mambots/content/advemail.php
- Go to line 71 and delete this line:
$toemail = str_replace('@', '&#64;', $toemail); //for e-mail cloacking bot

Save the file and you are ready.
Title: Re: Disable SPAM-protection?
Post by: nikos65 on August 29, 2008, 11:59:40
Thank you  :)
Title: Re: Disable SPAM-protection?
Post by: owl on August 29, 2008, 12:39:37
Thank you from me, too :-)
Title: Re: Disable SPAM-protection?
Post by: owl on August 29, 2008, 16:04:50
Hi,
I just added an "advanced e-mail-button" to tinymce-xtd... You can download the file (please unpack it in mambots/editors-xtd/) from my site (http://publicbeta.karnaya.de/work/opensource/elxis/advemail_editor-xtd.zip). (Just add the e-mail-button to bots, then)

Best regards,
owl
Title: Re: Disable SPAM-protection?
Post by: owl on September 01, 2008, 11:14:21
Hi,

just another problem (with the mosadvemail.btn.php-stuff): there are & needed for advmail. Inserting advmail-"text" via button doesn't work correctly, because the

{advemail name=Kostas Papadopoulos&email=kostas@yahoo.com&subject=Testing message&linktext=Contact Kostas}sample message{/advemail} becomes

{advemail name=Kostas Papadopoulos&amp;email=kostas@yahoo.com&amp;subject=Testing message&amp;linktext=Contact Kostas}sample message{/advemail}

(and html-code says: advemail name=Kostas Papadopoulos&amp;amp;email=kostas@yahoo.com&amp;amp;subject=Testing message&amp;amp;linktext=Contact Kostas}sample message{/advemail} )

Writing down %26 (& in iso-latin1) doesn't help... :-/  (Inserting the text works correctly without enabled TinyMCE)

Best regards,
owl
Title: Re: Disable SPAM-protection?
Post by: datahell on September 01, 2008, 12:21:09
TinyMCE by default replaces '&' with '&amp;' for xhtml compatibility. So, if via your button, enter '&amp;' it will transform it to '&amp;amp;' which is wrong. This wont happen if you enter a single '&' (it will transform it to '&amp;' which is fine). To remove double '&'s you can turn the editor to html mode and correct the html source code.

You can also edit advemail bot and add something like this:

$x = eUTF::utf8_str_replace('&amp;', '&', $x);

where $x the bot code
Title: Re: Disable SPAM-protection?
Post by: owl on September 01, 2008, 14:26:57
$x = eUTF::utf8_str_replace('&amp;', '&', $x);

Hmmm, maybe simply modifiying
Code: [Select]
    $arguments = eUTF::utf8_str_replace("&amp;", "&", $arguments);to
Code: [Select]
    $arguments = eUTF::utf8_str_replace("&amp;amp;", "&", $arguments);
    $arguments = eUTF::utf8_str_replace("&amp;", "&", $arguments);
Thx a lot