Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 3ca7e0e5486da714e98ac79af09ca745 > files > 86

php-smarty2-doc-2.6.28-2.mga4.noarch.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{mailto}</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="Smarty Manual">
<link rel="up" href="language.custom.functions.html" title="Chapter 8. Custom Functions">
<link rel="prev" href="language.function.html.table.html" title="{html_table}">
<link rel="next" href="language.function.math.html" title="{math}">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">{mailto}</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="language.function.html.table.html">Prev</a> </td>
<th width="60%" align="center">Chapter 8. Custom Functions</th>
<td width="20%" align="right"> <a accesskey="n" href="language.function.math.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="{mailto}">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="language.function.mailto"></a>{mailto}</h2></div></div></div>
<p>
   <code class="varname">{mailto}</code> automates the creation of a <code class="literal">mailto:</code>
   anchor links and optionally encodes them. Encoding emails makes it more
   difficult for web spiders to lift email addresses off of a site.
  </p>
<div class="note" title="Technical Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Technical Note</h3>
<p>
   Javascript is probably the most thorough form of
   encoding, although you can use hex encoding too.
  </p>
</div>
<p>
 </p>
<div class="informaltable"><table border="1">
<colgroup>
<col align="center">
<col align="center">
<col align="center">
<col align="center">
<col>
</colgroup>
<thead><tr>
<th align="center">Attribute Name</th>
<th align="center">Type</th>
<th align="center">Required</th>
<th align="center">Default</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td align="center">address</td>
<td align="center">string</td>
<td align="center">Yes</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>The e-mail address</td>
</tr>
<tr>
<td align="center">text</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>The text to display, default is the e-mail address</td>
</tr>
<tr>
<td align="center">encode</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>none</em></span></td>
<td>How to encode the e-mail. Can be one of <code class="literal">none</code>,
      <code class="literal">hex</code>, <code class="literal">javascript</code>
      or <code class="literal">javascript_charcode</code>.</td>
</tr>
<tr>
<td align="center">cc</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Email addresses to carbon copy, separate entries by a comma.
     </td>
</tr>
<tr>
<td align="center">bcc</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Email addresses to blind carbon copy,
      separate entries by a comma</td>
</tr>
<tr>
<td align="center">subject</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Email subject</td>
</tr>
<tr>
<td align="center">newsgroups</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Newsgroups to post to, separate entries by a comma.</td>
</tr>
<tr>
<td align="center">followupto</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Addresses to follow up to, separate entries by a comma.</td>
</tr>
<tr>
<td align="center">extra</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center"><span class="emphasis"><em>n/a</em></span></td>
<td>Any extra information you want passed to the link, such
      as style sheet classes</td>
</tr>
</tbody>
</table></div>
<div class="example">
<a name="id3075887"></a><p class="title"><b>Example 8.23. {mailto} example lines followed by the result</b></p>
<div class="example-contents"><pre class="programlisting">

{mailto address="me@example.com"}
&lt;a href="mailto:me@example.com" &gt;me@example.com&lt;/a&gt;

{mailto address="me@example.com" text="send me some mail"}
&lt;a href="mailto:me@example.com" &gt;send me some mail&lt;/a&gt;

{mailto address="me@example.com" encode="javascript"}
&lt;script type="text/javascript" language="javascript"&gt;
   eval(unescape('%64%6f% ... snipped ...%61%3e%27%29%3b'))
&lt;/script&gt;

{mailto address="me@example.com" encode="hex"}
&lt;a href="mailto:%6d%65.. snipped..3%6f%6d"&gt;&amp;#x6d;&amp;..snipped...#x6f;&amp;#x6d;&lt;/a&gt;

{mailto address="me@example.com" subject="Hello to you!"}
&lt;a href="mailto:me@example.com?subject=Hello%20to%20you%21" &gt;me@example.com&lt;/a&gt;

{mailto address="me@example.com" cc="you@example.com,they@example.com"}
&lt;a href="mailto:me@example.com?cc=you@example.com%2Cthey@example.com" &gt;me@example.com&lt;/a&gt;

{mailto address="me@example.com" extra='class="email"'}
&lt;a href="mailto:me@example.com" class="email"&gt;me@example.com&lt;/a&gt;

{mailto address="me@example.com" encode="javascript_charcode"}
&lt;script type="text/javascript" language="javascript"&gt;
    &lt;!--
    {document.write(String.fromCharCode(60,97, ... snipped ....60,47,97,62))}
    //--&gt;
&lt;/script&gt;

</pre></div>
</div>
<br class="example-break"><p>
 See also
 <a class="link" href="language.modifier.escape.html" title="escape"><code class="varname">escape</code></a>,
 <a class="link" href="language.function.textformat.html" title="{textformat}"><code class="varname">{textformat}</code></a>
 and
 <a class="link" href="tips.obfuscating.email.html" title="Obfuscating E-mail Addresses">obfuscating email addresses</a>.
 </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="language.function.html.table.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="language.custom.functions.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="language.function.math.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">{html_table} </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> {math}</td>
</tr>
</table>
</div>
</body>
</html>