Jump to content

A quick solution and simple, I'm sure


Recommended Posts

post-1216186-0-14741500-1463445913_thumb.jpg

 

At the moment, the email address in my Contact Information Block/Module can be clicked on and it opens up the user's default email program (mailto function).

I would like to disable the mailto function and just have my email address in plain text (in the hope that it will reduce spam).

I think I need to modify one or both of these two files?

blockcontact.tpl
blockcontactinfos.tpl

in both my core folder and theme folder

But I do not know what the code should be. I have copied and pasted the present code below:

 

blockcontact.tpl

<div id="contact_block" class="block">
<h4 class="title_block">{l s='Contact us' mod='blockcontact'}</h4>
<div class="block_content clearfix">
<p>{l s='Our support hotline is available 24/7.' mod='blockcontact'}</p>
{if $telnumber != ''}<p class="tel"><span class="label">{l s='Phone:' mod='blockcontact'}</span><span itemprop="telephone"><a href="tel:{$telnumber|escape:'html':'UTF-8'}">{$telnumber|escape:'html':'UTF-8'}</a></span></p>{/if}
{if $email != ''}<a href="mailto:{$email|escape:'html':'UTF-8'}" title="{l s='Contact our expert support team!' mod='blockcontact'}">{l s='Contact our expert support team!' mod='blockcontact'}</a>{/if}
</div>
</div>

 

blockcontactinfos.tpl

<!-- MODULE Block contact infos -->
<div id="block_contact_infos">
<h4 class="title_block">{l s='Contact us' mod='blockcontactinfos'}</h4>
<ul>
{if $blockcontactinfos_company != ''}<li><strong>{$blockcontactinfos_company|escape:'html':'UTF-8'}</strong></li>{/if}
{if $blockcontactinfos_address != ''}<li><pre>{$blockcontactinfos_address|escape:'html':'UTF-8'|nl2br}</pre></li>{/if}
{if $blockcontactinfos_phone != ''}<li>{l s='Tel' mod='blockcontactinfos'} {$blockcontactinfos_phone|escape:'html':'UTF-8'}</li>{/if}
{if $blockcontactinfos_email != ''}<li>{l s='Email:' mod='blockcontactinfos'} {mailto address=$blockcontactinfos_email|escape:'html':'UTF-8' encode="hex"}</li>{/if}
</ul>
</div>
<!-- /MODULE Block contact infos -->



 

Edited by kinderyum (see edit history)
Link to comment
Share on other sites

This is just simple html: remove the <a....> and </a> enclosing texts. So

<a href="mailto:{$email|escape:'html':'UTF-8'}" title="{l s='Contact our expert support team!' mod='blockcontact'}">{l s='Contact our expert support team!' mod='blockcontact'}</a>

will become just 

{l s='Contact our expert support team!' mod='blockcontact'}
Link to comment
Share on other sites

  • 2 weeks later...

 

This is just simple html: remove the <a....> and </a> enclosing texts. So

<a href="mailto:{$email|escape:'html':'UTF-8'}" title="{l s='Contact our expert support team!' mod='blockcontact'}">{l s='Contact our expert support team!' mod='blockcontact'}</a>

will become just 

{l s='Contact our expert support team!' mod='blockcontact'}

Thank you! I will try it! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...