1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-13 19:15:19 +01:00

29 lines
1.1 KiB
BlitzBasic
Raw Normal View History

//<?php
$class = e107::getBB()->getClass('email');
2009-10-21 09:41:54 +00:00
global $pref;
if($pref['make_clickable'])
{
if($parm)
{
list($p1,$p2) = explode("@",$parm);
return "<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"".$p1."\"+\"@\"+\"".$p2."\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"".$p1."\"+\"@\"+\"".$p2."\"; return true;' onmouseout='window.status=\"\";return true;'>".$code_text."</a>";
}
else
{
2009-11-17 11:00:40 +00:00
list($p1, $p2) = explode("@", $code_text);
// CHARSET is utf-8 - email.bb too
$email_text = $p1.'©'.$p2;
2009-10-21 09:41:54 +00:00
return "<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"".$p1."\"+\"@\"+\"".$p2."\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"".$p1."\"+\"@\"+\"".$p2."\"; return true;' onmouseout='window.status=\"\";return true;'>".$email_text."</a>";
}
}
// Old method that attracts SPAM.
2006-12-02 04:36:16 +00:00
if ($parm) {
return "<a class='{$class}' href='mailto:".$tp -> toAttribute($parm)."'>".$code_text."</a>";
2006-12-02 04:36:16 +00:00
} else {
return "<a class='{$class}' href='mailto:".$tp -> toAttribute($code_text)."'>".$code_text."</a>";
2006-12-02 04:36:16 +00:00
}