has anyone worked out how to get the time added to a date format
Shows minuets and hours but when its days changes to actual upload date
Printable View
has anyone worked out how to get the time added to a date format
Shows minuets and hours but when its days changes to actual upload date
Are you talking about "uploaded yadda yadda days ago..." rather than 'uploaded on yadda yadda"?
No like this...
Added: 30seconds ago
Added: 30minuets ago
Added: 20 days ago
//Anything above 30 days will go to date format
Added: 1 may 2009
Ok, if I understand you correctly...
You want it to have the number of days and then when it reaches 30 days, it will go to date format?
I'll see what I can find if someone else doesn't post it first.
Figured it out
Code:{insert name=time_range assign=rtime field=addtime IDFR=VID id=$video_id tbl=video}
{if $rtime eq || > 29}
{$show_content[i].adddate|date_format:"%d-%m-%Y"}
{else}
{$rtime}
{/if}
Also a way to get time added to display:
May 10, 2009
Anywhere in videos.tpl put:
Tada another nasty hack by me.. :wink:Code:{php}
$new_date = $this->_tpl_vars['video_info'][$this->_sections['i']['index']]['adddate'];
echo date('F j, Y', strtotime($new_date)) ;
{/php}