The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ] 
Author Message
PostPosted: Tue Sep 29, 2009 2:01 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Sep 29, 2009 1:54 pm
Posts: 1
Hi there,

the emailcloaking plugin in joomla! works only in content.

What's know with emailadresses in modules?

Is it possible to make the plugin also working with modules?

Thanks


Top
 Profile  
 
PostPosted: Fri Oct 16, 2009 9:17 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 03, 2009 9:32 am
Posts: 7
i have the same problem.
anyone has a solution?


Top
 Profile  
 
PostPosted: Wed Nov 04, 2009 12:23 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 20, 2006 8:19 am
Posts: 3
I'd like to know the same answer. Is there any way to get the email cloaking work on modules(or components) in joomla 1.5.14?


Last edited by ooffick on Mon Nov 09, 2009 11:34 am, edited 1 time in total.
Mod Note: Bump post deleted, please do not bump your posts.


Top
 Profile  
 
PostPosted: Fri Nov 06, 2009 8:30 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 7:37 am
Posts: 5
I've been searching for this too and found this -- trying it in my own component, so maybe it will help someone else.

Code:
$email = 'some.email@some.domain';
$emcloaked = JHTML::_('Email.cloak',$email);
echo $emcloaked;


Top
 Profile  
 
PostPosted: Fri Nov 06, 2009 8:47 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 20, 2006 8:19 am
Posts: 3
Yeah I got pretty much the same answer from other site too.

My main concern is to get it work on Joomla's Custom module but there is no code for that module except mod_custom.xml file so Im kinda clueless where should I put that code. Normally for modules there is some xxx.php files where I could put that but with mod_custom there is none.

Any ideas for this?

Custom module is very ideal for presenting contact information but it definately needs that email cloaking.


Top
 Profile  
 
PostPosted: Mon Nov 09, 2009 10:53 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
Are you sure it's not working? I believe that it is fires.

I'm going to move this to the appropriate forum, since it's not a bug report.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Mon Nov 09, 2009 12:10 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 20, 2006 8:19 am
Posts: 3
That is easy to test. Just make Custom module and write some email there and see from the source code is it cloaked or not. It is definately not cloaked.


Top
 Profile  
 
PostPosted: Mon Nov 09, 2009 12:12 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10946
Location: Ireland
You cannot use any content plugins in the Custom HTML module.

But you could use the following module instead:
http://extensions.joomla.org/extensions ... dules/4175

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Tue Nov 10, 2009 10:41 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
Sigh, yup I was remembering that it was added to section and category descriptions.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Fri Jun 04, 2010 10:57 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 17, 2006 9:27 am
Posts: 85
Location: United Kingdom
Here's a solution to cloak an email address in a module using the same script code that Joomla! creates with the standard content plugin, that doesn't require installation of other plugins etc. (which I always prefer for security reasons, it means less extensions to maintain):

Create a standard contact in the Joomla! Contacts component, just entering the required email address to be cloaked.

Create a menu item linking to this contact you have created.

View the contact page on the site and view the source of the page. In the source, find the script that Joomla! inserts to cloak the email address. Tip: search for 'addy' and you will find it.

Copy the whole script (there are three <script> blocks) and paste into your custom module editor.

Save the module and that's it.

_________________
http://www.starfishwebsites.com
In need of some loving... https://www.facebook.com/starfishwebsites


Top
 Profile  
 
PostPosted: Sat Jun 26, 2010 5:09 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 01, 2008 5:55 pm
Posts: 10
The editor strips out the javascript when it is saved.


Top
 Profile  
 
PostPosted: Sun Jun 27, 2010 3:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 10, 2009 8:36 am
Posts: 6
Location: France (South)
A solution for Joomla developers 8)

http://www.kirbymixedmedia.com/hacks-ma ... -in-joomla

i test it in J!1.5.17, it works ;)
But you need to install a "PHP code module" such as mod_html or mod_php to make it works !


Top
 Profile  
 
PostPosted: Sun Jul 18, 2010 11:43 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 14, 2010 1:33 pm
Posts: 5
<?php if ($module->module == 'mod_custom') {
$module->content = JHTML::_('content.prepare', $module->content);
}?>

added in templates/system/html/modules.php
applies all active plugins in the custom html module

It does the work for me but breaks MVC...


Top
 Profile  
 
PostPosted: Mon Jul 19, 2010 6:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 14, 2010 1:33 pm
Posts: 5
Actually I have digged a bit in the joomla spec.
Have a look here: http://docs.joomla.org/What_is_module_chrome%3F

Using that you just need to specify chrome module in your template and apply the code I have proposed.

That way you can define additional name of inculde in temate and apply a specific style to that as a result you can mange from Administartor to which modules you want to apply plug-ins and to which don't.

1. Define module chrome in your template (html/module.php in your template directory)
Code:
<?php
function modChrome_applyPlg($module, &$params, &$attribs)
{
?>
      <div class="module<?php echo $params->get('moduleclass_sfx'); ?>">
         <?php if ($module->showtitle != 0) : ?>
            <h3><?php echo $module->title; ?></h3>
         <?php endif; ?>
         $module->content = JHTML::_('content.prepare', $module->content);
         echo $module->content; ?>
      </div>
   <?php
}

?>

2. Define in template area for your module with plug-in applied:
Code:
<jdoc:include type="modules" name="left" style="applyPlg" />

3. Don't forget to update 'templateDetails.xml'
4. Form administrator publish your module in new area


Top
 Profile  
 
PostPosted: Sat Sep 11, 2010 11:00 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 15, 2009 11:01 am
Posts: 26
this worked for me :D :

erickaps wrote:
Here's a solution to cloak an email address in a module using the same script code that Joomla! creates with the standard content plugin, that doesn't require installation of other plugins etc. (which I always prefer for security reasons, it means less extensions to maintain):

Create a standard contact in the Joomla! Contacts component, just entering the required email address to be cloaked.

Create a menu item linking to this contact you have created.

View the contact page on the site and view the source of the page. In the source, find the script that Joomla! inserts to cloak the email address. Tip: search for 'addy' and you will find it.

Copy the whole script (there are three <script> blocks) and paste into your custom module editor.

Save the module and that's it.

_________________
http://urbanwireless.info | http://glutenfreedietfinder.com.au


Top
 Profile  
 
PostPosted: Thu Jan 24, 2013 12:15 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Sep 07, 2005 10:18 pm
Posts: 617
Location: London
vdizzle wrote:
I've been searching for this too and found this -- trying it in my own component, so maybe it will help someone else.

Code:
$email = 'some.email@some.domain';
$emcloaked = JHTML::_('Email.cloak',$email);
echo $emcloaked;


This is working for me 2.5.8 thanks vdizzle

_________________
Check out the 'bad toilet' online !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group