11
ghia
Re: Is there a way to replace the users email in the user profile by an email link (or envelop icon)
  • 2008/11/11 12:59

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In your template /profile/templates/profile_userinfo.html change
<{foreach item=field from=$category.fields}>
 <
tr>
  <
td class="head"><{$field.title}></td>
  <
td class="even"><{$field.value}></td>
 </
tr>
<{/foreach}>
to something like
<{foreach item=field from=$category.fields}>
 <
tr>
  <{if 
$field.title == 'Email'}>
   <
td class="head"><{$field.title}></td>
   <
td class="even">
    <
a href="mailto:<{$field.value}>">
     <
img src="/modules/news/images/friend.gif" alt="mail" title="mail" />
    </
a>
   </
td>
  <{else}>
   <
td class="head"><{$field.title}></td>
   <
td class="even"><{$field.value}></td>
  <{/if}>
 </
tr>
<{/foreach}>

12
trabis
Re: Is there a way to replace the users email in the user profile by an email link (or envelop icon)
  • 2008/11/11 13:52

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Or:
Look around line 133 and replace by this:
if ($email != "") {
    
$email = '<a href="mailto:'.$email.'" title="mail"><img src="'.XOOPS_URL.'/images/email.gif" alt="mail" /></a>';
    
$categories[0]['fields'][] = array('title' => _PROFILE_MA_EMAIL, 'value' => $email);
    
$weights[0][] = 0;
}

13
deka87
Re: Is there a way to replace the users email in the user profile by an email link (or envelop icon)
  • 2008/11/11 18:27

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


thanks guys. you always rock
Mind anchors