post Question : get answer

please Encourage answers by Voting for Best Answers by using 'Did you?' button.
i have suggest about raintpl
hello,
now i want make my copyright in the footer
but i want it dynamic
such as
Copyright © 2008-<?php echo date("Y"); ?>.
its works by the PHP now i cant make it in the RAINTPL because i must assign the Y in the PHP file first i mean php file
$tpl->assign("Y","Y");
to use it in the html
Copyright © 2008-{$Y|date}.
this becuase
{$var|function_name:par_1,par_2}
is there any way to make it
{"Y"|date}
asked:8 months ago | by:Gordon | viewed:141 times | latest activity:8 months ago
Another solution that works, but make ugly your template code:
{if condition="$year=date('Y')"}{/if}
Copyright 2008-{$year}
0 of 0 people found this answer helpful. Did you? Yes No
answered by raintpl in 8 months ago
its not important to make it like that {"Y"|date}
according to:
raintpl_1.7.6/example.php on line 28
the programmer made it by differant way.
you can make it like that
$tpl->assign( 'copyright', 'Copyright 2008-'.date("Y") );
and see also you can make a function like this
function templete_date($value,$format = 'M jS, Y'){
return date($format,$value);	
}
and in tpl use
{$date|templete_date}
0 of 0 people found this answer helpful. Did you? Yes No
answered by jooria in 8 months ago | last update in 4 months ago by jooria
want answer this Question? just login or signup its easy and fast.