×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: hiding emails from spiders

hiding emails from spiders 11 years 7 months ago #17519

  • Brecht Coene
  • Brecht Coene's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 0
Sometimes users insert theirs emails into comments. Is there any way to hide those emails from spiders? Is something like this in compojoomComment? or can you suggest some plugin for this? Comments are also in our custom components, not only in joomla articles.

hiding emails from spiders 11 years 7 months ago #17523

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Those emails are never shown to the public. They are saved in the db so that we can send notifications to the user. That is why we don't need to do anything to protect from spiders...

Cheers,
Daniel

hiding emails from spiders 11 years 7 months ago #17530

  • Brecht Coene
  • Brecht Coene's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 0
I know authors' emails are not available to public.
Question was about emails in comment body. Sometimes users put theirs emails to be visible for other users (lets say to author of kind of article). We would like to hide those emails from bots but we want users to see emails.
I know there are some kind of plugins to do this (JS, recaptcha). Is something like this in compojoom comments?

hiding emails from spiders 11 years 7 months ago #17537

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Kristof,
Sorry, I misunderstood the question. No the emails entered in the comments are not protected.

What comes to my mind as an idea is - hack the function where we create each individual comment and run the content of the comment through the email cloak plulgin that joomla already has.

Daniel

hiding emails from spiders 11 years 7 months ago #17633

  • Brecht Coene
  • Brecht Coene's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 0
We did it in com_comment plugin for our coustom component:
require_once(JPATH_SITE.DS.'components'.DS.'com_comment'.DS.'joscomment'.DS.'utils.php');
$comObject = JOSC_utils::ComPluginObject('com_ourcomponent',$id);
 
$row = new stdclass();
$row->text = JOSC_utils::execJoomlaCommentPlugin($comObject, $id, $params, true);
 
$row->text = str_replace('@', '@', $row->text);
 
JPluginHelper::importPlugin( 'content' );
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger( 'onContentPrepare', array( 'com_ourcomponent', &$row, null ) );
echo $row->text;

It makes joomla email cloaking plugin to work with our component. For users emails are standard links to email. For bots this is only a javascript code, not an email to be harvested.

Can you give a feedback for this solution?

hiding emails from spiders 11 years 7 months ago #17636

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yep, this would be the way I would do it in 4.2 .
In the next version this should be per default there - comments should be parsed with the content plugins - this way one could use galleries and other interesting 3rd party components.
Daniel
  • Page:
  • 1
Time to create page: 0.115 seconds