Mon 27th Mar 2006
Human Age Smarty Modifier
Posted in the evening, filed under Blogsome , Smarty Templates.The Smarty Modifier “Human Age” works well under Blogsome, I’ll ask the admins to install it.
It’s used like:
{capture name=pdate}{the_time d="U"}{/capture} {capture name=cdate}{comment_date d="U"}{/capture} {assign var=since value=$smarty.capture.pdate|human_age:$smarty.capture.cdate:true:2}
Then, where you want the data to go:
{$since} after the fact.
Note: this is not installed on the main Blogsome server yet.
However, you can already use:
{human_time_diff from=$smarty.capture.pdate to=$smarty.capture.cdate}
after having captured the dates. It isn’t quite as nice as the other version, as it only displays minutes/hours/days, but it will do for now.