Results 1 to 6 of 6

Thread: time added to a date format

  1. #1

    Default time added to a date format

    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

  2. #2
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: time added to a date format

    Are you talking about "uploaded yadda yadda days ago..." rather than 'uploaded on yadda yadda"?
    If it's not fun, stop doing it!

  3. #3

    Default Re: time added to a date format

    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

  4. #4
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: time added to a date format

    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.
    If it's not fun, stop doing it!

  5. #5

    Default Re: time added to a date format

    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}

  6. #6

    Default Re: time added to a date format

    Also a way to get time added to display:

    May 10, 2009

    Anywhere in videos.tpl put:

    Code:
     {php}
    $new_date = $this->_tpl_vars['video_info'][$this->_sections['i']['index']]['adddate'];
    echo date('F j, Y', strtotime($new_date)) ;
    {/php}
    Tada another nasty hack by me.. :wink:

Similar Threads

  1. Change date format?
    By Misinformed in forum General Discussions
    Replies: 1
    Last Post: 02-02-2008, 03:37 PM
  2. your video was succesfully added error
    By farr in forum Installation Support
    Replies: 1
    Last Post: 01-12-2008, 04:58 AM
  3. Crippled added pages
    By musictvblogger in forum Fixed Bugs
    Replies: 4
    Last Post: 10-15-2007, 07:01 PM
  4. back and next links in new videos added
    By pdiddy8117 in forum Feature Requests
    Replies: 0
    Last Post: 06-20-2007, 08:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •