EMail Cloaking

Help
2009-10-20
2013-04-17
  • Matt Zundel

    Matt Zundel - 2009-10-20

    I thought I would share a little bit of code that I added to cloak the email address.  The code cloaks via the cloaking feature of Joomla.

    The file I edited was aardvertiser.php in the components/com_aardvertiser directory.  Line 130 shows:

            HTML_classifieds::showAd($row, $option, $currency, $font, $state_col    or, $detail_color, $find, $googapi, $map);

    Add the following starting on line 130 so the origional line 130 is pushed to line 143:

        //Cloak the email address
        global $mainframe;
        $plugin =& JPluginHelper::getPlugin('content', 'emailcloak');
        $pluginParams = new JParameter( $plugin->params );
        require_once (JPATH_SITE.DS.'plugins'.DS.'content'.DS.'emailcloak.php');
        
        $row2 = new stdClass;
        $row2->text = $row->contact_email;
        
        plgContentEmailCloak($row2,$pluginParams);
        
        $row->contact_email = $row2->text;
        //End cloaking

    This will cloak all the email so that it is less likely to be seen by spam bots.

     
  • Simon Phillips

    Simon Phillips - 2010-04-09

    Thanks, this code has now been added

     

Log in to post a comment.