How an image can act as a mailto - Joomla! Forum - community, help and support
hi,
i transfering raw site joomla (2.5) , have difficulties implement features used in site.
for instance in page
old site : <a href="mailto:<?php print(getusermail("xxxxxx"));?>" target="_self">
<img src="../images/xxxxxxx.jpg" align="absmiddle" /></a>
where php return email located in db of user want mail to.
i use directphp work follow (to test)
<?php require_once('/php/jfunctions.php'); getusermail(344);?>
where 344 userid (the username does'nt work)
the php file contains :
<?php
function getusermail($id) {
$user = jfactory::getuser( $id);
echo "'" . $user->email ;
?>
it not best writting, want add other parameters afterwords , of course test if works. (but does'nt would).
the return of the php ok but result on page following :
<script type="text/javascript">
<!--
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy67188 = 'daniefranc' + '@';
addy67188 = addy67188 + 'numericable' + '.' + 'fr';
document.write('<a ' + path + '\'' + prefix + ':' + addy67188 + '\'>');
document.write(addy67188);
document.write('<\/a>');
//-->\n </script>
<a href="mailto:xxxxxx@yyyy.fr">xxxxxx@yyyy.fr</a>
<script type="text/javascript">
<!--
document.write('<span style=\'display: none;\'>');
//-->
</script>
so cannot insert image want in href tag. didn't find document avoid automatic generation. not email address text, prefer people name instead.
may can me or suggest other solution.
the site today french site "www.apai.fr"
thanks lot in advance
i transfering raw site joomla (2.5) , have difficulties implement features used in site.
for instance in page
old site : <a href="mailto:<?php print(getusermail("xxxxxx"));?>" target="_self">
<img src="../images/xxxxxxx.jpg" align="absmiddle" /></a>
where php return email located in db of user want mail to.
i use directphp work follow (to test)
<?php require_once('/php/jfunctions.php'); getusermail(344);?>
where 344 userid (the username does'nt work)
the php file contains :
<?php
function getusermail($id) {
$user = jfactory::getuser( $id);
echo "'" . $user->email ;
?>
it not best writting, want add other parameters afterwords , of course test if works. (but does'nt would).
the return of the php ok but result on page following :
<script type="text/javascript">
<!--
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy67188 = 'daniefranc' + '@';
addy67188 = addy67188 + 'numericable' + '.' + 'fr';
document.write('<a ' + path + '\'' + prefix + ':' + addy67188 + '\'>');
document.write(addy67188);
document.write('<\/a>');
//-->\n </script>
<a href="mailto:xxxxxx@yyyy.fr">xxxxxx@yyyy.fr</a>
<script type="text/javascript">
<!--
document.write('<span style=\'display: none;\'>');
//-->
</script>
so cannot insert image want in href tag. didn't find document avoid automatic generation. not email address text, prefer people name instead.
may can me or suggest other solution.
the site today french site "www.apai.fr"
thanks lot in advance
this automatic (and annoying) generation caused plugin called "content - email cloaking" used prevent emails being spammed. if ask me, method of obfuscating email inefficient , useless, that's opinion.
in case, can fix problem disabling plugin.
in case, can fix problem disabling plugin.
Comments
Post a Comment