<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Quick question to the wisdom of the community...&nbsp; I am not very experience with objects, and I was wondering where will be the right place&nbsp;to define my own smarty functions...<BR>
&nbsp;<BR>
My goal is to have something similar to the sample from the smarty documentation...:<BR>
&nbsp;<BR>

<TABLE cellPadding=5 bgColor=#e0e0e0 border=0>
<TBODY>
<TR>
<TD><CODE><SPAN style="COLOR: #000000"><SPAN style="COLOR: #0000bb">&lt;?php<BR>$smarty</SPAN><SPAN style="COLOR: #007700">-&gt;</SPAN><SPAN style="COLOR: #0000bb">register_function</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #dd0000">'date_now'</SPAN><SPAN style="COLOR: #007700">,&nbsp;</SPAN><SPAN style="COLOR: #dd0000">'print_current_date'</SPAN><SPAN style="COLOR: #007700">);<BR><BR>function&nbsp;</SPAN><SPAN style="COLOR: #0000bb">print_current_date</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$params</SPAN><SPAN style="COLOR: #007700">,&nbsp;&amp;</SPAN><SPAN style="COLOR: #0000bb">$smarty</SPAN><SPAN style="COLOR: #007700">)<BR>{<BR>&nbsp;&nbsp;if(empty(</SPAN><SPAN style="COLOR: #0000bb">$params</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'format'</SPAN><SPAN style="COLOR: #007700">]))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000bb">$format&nbsp;</SPAN><SPAN style="COLOR: #007700">=&nbsp;</SPAN><SPAN style="COLOR: #dd0000">"%b&nbsp;%e,&nbsp;%Y"</SPAN><SPAN style="COLOR: #007700">;<BR>&nbsp;&nbsp;}&nbsp;else&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000bb">$format&nbsp;</SPAN><SPAN style="COLOR: #007700">=&nbsp;</SPAN><SPAN style="COLOR: #0000bb">$params</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'format'</SPAN><SPAN style="COLOR: #007700">];<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;return&nbsp;</SPAN><SPAN style="COLOR: #0000bb">strftime</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$format</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb">time</SPAN><SPAN style="COLOR: #007700">());<BR>}<BR></SPAN><SPAN style="COLOR: #0000bb">?&gt;</SPAN> </SPAN></CODE></TD></TR></TBODY></TABLE><BR>
And in the template call the function...<BR>

<TABLE cellPadding=5 bgColor=#e0e0e0 border=0>
<TBODY>
<TR>
<TD><PRE class=programlisting>{date_now}

{* or to format differently *}
{date_now format="%Y/%m/%d"}</PRE></TD></TR></TBODY></TABLE><BR>
&nbsp;<BR>
but I am not sure how/where to connect the php part of the code... <BR>
&nbsp;<BR>
Any help is highly appreciated!!!<BR>
Thanks...<BR>
Ignacio<BR></body>
</html>