Mailto: not working in Joomal 1.0.13, with Email Mambot version 1.0.0

Locked
bigbassfish
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Oct 22, 2007 9:13 pm

Mailto: not working in Joomal 1.0.13, with Email Mambot version 1.0.0

Post by bigbassfish » Mon Oct 22, 2007 9:35 pm

I finally got my Mailto to work in for my website.  It was working fine and then I couldn't enter mailto:"xxxx.xxx.xxx"
the link wasn't working at all so I read the boards and then went into
mosemailcloak.php file and found this -

Code: Select all

$_MAMBOTS->registerFunction( 'onPrepareContent', 'botMosEmailCloak' );

/**
* Mambot that Cloaks all emails in content from spambots via javascript
*/
function botMosEmailCloak( $published, &$row, &$params, $page=0 ) {
	global $database, $_MAMBOTS;

	// check whether mambot has been unpublished
	if ( !$published ) {
		return true;
	}
	
	// simple performance check to determine whether bot should process further
	if ( strpos( $row->text, '@' ) === false ) {
		return true;
	}
		
	// simple check to allow disabling of bot
	$regex = '{emailcloak=off}';
	if ( strpos( $row->text, $regex ) !== false ) {
		$row->text = str_replace( $regex, '', $row->text );
		return true;
	}
	
	// check if param query has previously been processed
	if ( !isset($_MAMBOTS->_content_mambot_params['mosemailcloak']) ) {
		// load mambot params info
		$query = "SELECT params"
		. "\n FROM #__mambots"
		. "\n WHERE element = 'mosemailcloak'"
		. "\n AND folder = 'content'"
I changed the code to -

Code: Select all

$_MAMBOTS->registerFunction( 'onPrepareContent', 'botMosEmailCloak' );

/**
* Mambot that Cloaks all emails in content from spambots via javascript
*/
function botMosEmailCloak( $published, &$row, &$params, $page=0 ) {
	global $database, $_MAMBOTS;

	// check whether mambot has been unpublished
	if ( !$published ) {
		return true;
	}
	
	// simple performance check to determine whether bot should process further
	if ( strpos( $row->text, '@' ) === false ) {
		return true;
	}
		
	// simple check to allow disabling of bot
	$regex = '{emailcloak=off}';
	if ( strpos( $row->text, $regex ) == false ) {
		$row->text = str_replace( $regex, '', $row->text );
		return true;
	}
	
	// check if param query has previously been processed
	if ( !isset($_MAMBOTS->_content_mambot_params['mosemailcloak']) ) {
		// load mambot params info
		$query = "SELECT params"
		. "\n FROM #__mambots"
		. "\n WHERE element = 'mosemailcloak'"
		. "\n AND folder = 'content'"
Hope it works for you!

benya
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Sep 16, 2006 8:45 pm

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by benya » Mon May 05, 2008 12:17 am

Oops!!! At first I thought this was the fix i needed, but then when I took a look at the rendered HTML I found out that the so called fix above simply turns the MOS EMAIL CLOAK MAMBOT off! So now all my email addresses are no longer cloaked. YIKES! Looking at the code change above shows this to be true when you see that logic is inverted...

Below was my first optimistic response Sorry about that if it caused any confusion for others...

"Dude! it works for me as well! Thanks!!! btw, the above link is for email links that were created in the editor as: clickable links. If you just type in a plain text email address within any content on the Joomla site without making it clickable (i.e. WITHOUT using the <a> tag either directly in HTML or using a WYSIWYG editor), the mambot (or rather plugin) works fine with or without the above fix, sees an email address and cloaks it."
Ben Sheppard - Founding Director - Global ICT Systems Inc.
+1 646.512.1972 (mobile)
http://www.GlobalICTSystems.com
http://cms.globalictsystems.com/content ... ction/3/9/

benya
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Sep 16, 2006 8:45 pm

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by benya » Mon May 05, 2008 12:52 am

BTW, Here is my problem if anyone is experiencing the same, and or has found a solution:

The Email Cloaking Mambot: "mosemailcloak.php" is failing to pick up the class attribute within the <a> tag where a the MAILTO link exists... So, any CSS styles I try to apply to an email link do not get rendered once this bot rewrites the HTML code...

Any ides on how to fix this folks? I will take a look at the code later in the week and try to fix it when I have time... :) Guess I will start by searching on the expression "class=" to see if its even in the code somewhere...
Ben Sheppard - Founding Director - Global ICT Systems Inc.
+1 646.512.1972 (mobile)
http://www.GlobalICTSystems.com
http://cms.globalictsystems.com/content ... ction/3/9/

bigbassfish
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Oct 22, 2007 9:13 pm

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by bigbassfish » Mon May 05, 2008 4:57 am

benya wrote:BTW, Here is my problem if anyone is experiencing the same, and or has found a solution:

The Email Cloaking Mambot: "mosemailcloak.php" is failing to pick up the class attribute within the <a> tag where a the MAILTO link exists... So, any CSS styles I try to apply to an email link do not get rendered once this bot rewrites the HTML code...

Any ides on how to fix this folks? I will take a look at the code later in the week and try to fix it when I have time... :) Guess I will start by searching on the expression "class=" to see if its even in the code somewhere...
Hello there

when I put "mailto:xxxx.xxxx.xxx" in Joomla's link or hyperlink area after
I have added text to the text area in Joomla's editor page.

Such as :

Please email me at Myemail address.

And then you highlight Myemail and then to go link or hyperlink
button in and you enter mailto:xxxxxx.xxxxx.xxxxxx
You don't have to enter a class. You can put for title -mymailto.
then click - update.
that is it.

remember you can for mailto:xxxxx.xxxx.xxx do this : mailto:xxxxxx.xxx.xxx?subject=new news
so it enters the topic (subject) in the email .

bigbassfish
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Oct 22, 2007 9:13 pm

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by bigbassfish » Mon May 05, 2008 5:02 am

Code: Select all

    $_MAMBOTS->registerFunction( 'onPrepareContent', 'botMosEmailCloak' );

    /**
    * Mambot that Cloaks all emails in content from spambots via javascript
    */
    function botMosEmailCloak( $published, &$row, &$params, $page=0 ) {
       global $database, $_MAMBOTS;

       // check whether mambot has been unpublished
       if ( !$published ) {
          return true;
       }
       
       // simple performance check to determine whether bot should process further
       if ( strpos( $row->text, '@' ) === false ) {
          return true;
       }
          
       // simple check to allow disabling of bot
       $regex = '{emailcloak=off}';
       if ( strpos( $row->text, $regex ) === false ) {
          $row->text = str_replace( $regex, '', $row->text );
          return true;
       }
       
       // check if param query has previously been processed
       if ( !isset($_MAMBOTS->_content_mambot_params['mosemailcloak']) ) {
          // load mambot params info
          $query = "SELECT params"
          . "\n FROM #__mambots"
          . "\n WHERE element = 'mosemailcloak'"
          . "\n AND folder = 'content'"
Here are new changes again. Again all I did was put a '=' in there because
there was a " | " before the == false.

User avatar
corrado444
Joomla! Guru
Joomla! Guru
Posts: 860
Joined: Thu Jul 06, 2006 8:30 am
Location: Sacramento
Contact:

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by corrado444 » Mon Jun 09, 2008 6:22 pm

Greetings, I am not sure how old this post is and I should add that I found it while searching for a reason why my email cloaking mambot is not working at all.

In any case, I read th post and it seemed to me that replacing the core code of the mambot to fix the issue the poster is having is a bit of over engineering.

If the mambot prevents the class from working inside the <a> tag, why not try to change the look of the link using the "cascading" effect of CSS? In other words, you can affect any tag by pointing to the parent. If the email was in a div for instance (<div class="foobar">) then to point to that <a> tag would look like this:

.foobar a {some style here}

It should wrk. If you don;t have a div to use, wrap the email in a <span> with a class in it.

NOTE: I have not tested this with the mambot, I am not sure if it will fix it but it's worth a shot.

Good luck.
Watch the 10 Minute Joomla! Tips Video Podcast
Itunes: [url]itpc://10minutejoomlatips.blip.tv/rss/itunes[/url]
Feedburner http://feeds.feedburner.com/10MinutesJoomlaTips

benya
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Sep 16, 2006 8:45 pm

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by benya » Fri Jun 13, 2008 4:47 pm

This post is not that old, and I was still interested in replies, so thanks for the cascading tip! that will work fine and its easy enough to add a div using the JCE editor. I wonder why I did not think of that easy solution myself :-[ Guess I was not thinking in terms of scope with respect to what the the mambot rewrites.
Ben Sheppard - Founding Director - Global ICT Systems Inc.
+1 646.512.1972 (mobile)
http://www.GlobalICTSystems.com
http://cms.globalictsystems.com/content ... ction/3/9/

User avatar
bobysolo
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri Sep 15, 2006 2:16 pm
Contact:

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by bobysolo » Wed Jun 18, 2008 11:44 am

I was wondering if there is any way of making the emailcloaking bot work in Facileforms component? For now it works fine on the content items and modules, but it doesn't at all in the Facileforms component.

Is there a way of calling the cloacking function from inside the component via javascript or something?

Thanks.

firos
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Aug 27, 2008 7:11 am

Re: Mailto: not working in Joomal 1.0.13, with Email Mambot ver

Post by firos » Wed Aug 27, 2008 7:19 am

Dear friends,

Disable the plugin Email Cloaking in joomla administration to enable the mail to functioning.

Step:

1. Login as Joomla Administrator
2. Extentions - > Plugin Manager
3. Check the plugin "Content - Email Cloaking" and click Disable

Now your mailto code will work

Thanks


Locked

Return to “Joomla! 1.0.x_Q&T”