Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: Runtime - in Minutes/Seconds?

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

    Default

    Just so y'all know and to repeat above post that may have gotten lost...there is one flaw...it does not show the seconds correctly when the time is less than 10 seconds. If the time, for example is 3:03, it will appear as 3:3 (leaving out the zero). I don't know how to adjust for that and am hoping someone can give us the solution.

    To RECAP the codes you need to look for, here they are:

    FIND:

    Code:
    Runtime: {$answers[i].duration|string_format:"%.2f"}
    REPLACE WITH:

    Code:
    {assign var=viddur value=$answers[i].duration} 
    {math equation="$viddur/60" format="%0.0f" assign=minutes} 
    {math equation="$viddur - ($minutes * 60)" format="%0.0f" assign=seconds} 
    {if $seconds < 0} 
    {math equation="$minutes - 1" assign=minutes} 
    {math equation="$seconds + 60" assign=seconds} 
    {/if}            
    Runtime: {$minutes}:{$seconds}
    ---------------------------------------------

    FIND:

    Code:
    Runtime: {$vinfo[0].duration|string_format:"%.2f"}
    REPLACE WITH:

    Code:
    {assign var=viddur value=$vinfo[0].duration} 
    {math equation="$viddur/60" format="%0.0f" assign=minutes} 
    {math equation="$viddur - ($minutes * 60)" format="%0.0f" assign=seconds} 
    {if $seconds < 0} 
    {math equation="$minutes - 1" assign=minutes} 
    {math equation="$seconds + 60" assign=seconds} 
    {/if}            
    Runtime: {$minutes}:{$seconds}
    -------------------------------------------
    FIND:

    Code:
    Runtime: {$recadd[j].duration|string_format:"%.2f"}
    REPLACE WITH:

    Code:
    {assign var=viddur value=$recadd[j].duration} 
    {math equation="$viddur/60" format="%0.0f" assign=minutes} 
    {math equation="$viddur - ($minutes * 60)" format="%0.0f" assign=seconds} 
    {if $seconds < 0} 
    {math equation="$minutes - 1" assign=minutes} 
    {math equation="$seconds + 60" assign=seconds} 
    {/if}            
    Runtime: {$minutes}:{$seconds}
    ----------------------------------------------
    FIND:

    Code:
    Runtime: {$mostview[k].duration|string_format:"%.2f"}
    REPLACE WITH:

    Code:
    {assign var=viddur value=$mostview[k].duration} 
    {math equation="$viddur/60" format="%0.0f" assign=minutes} 
    {math equation="$viddur - ($minutes * 60)" format="%0.0f" assign=seconds} 
    {if $seconds < 0} 
    {math equation="$minutes - 1" assign=minutes} 
    {math equation="$seconds + 60" assign=seconds} 
    {/if}            
    Runtime: {$minutes}:{$seconds}
    What I did was keep this in a notepad document for future reference so that when a new template comes out, I use the "find/replace" feature of my editor (I use Dreamweaver) to make these changes. I suggest y'all do same. :)
    If it's not fun, stop doing it!

  2. #22
    Join Date
    May 2007
    Posts
    394

    Default

    Quote Originally Posted by grynmoors
    Just so y'all know and to repeat above post that may have gotten lost...there is one flaw...it does not show the seconds correctly when the time is less than 10 seconds. If the time, for example is 3:03, it will appear as 3:3 (leaving out the zero). I don't know how to adjust for that and am hoping someone can give us the solution.
    Solution is simple:
    http://www.otube.ca/view/2/drag-racing- ... s-desert-/

    Do a global "find all" in Dreamweaver of your Vshare folder of the word "Runtime"

    And change every place you see something like this....:

    Code:
    Runtime: {$minutes}:{$seconds}
    to something that's formatted to your taste; like this:

    Code:
    Runtime: {$minutes} minutes {$seconds} seconds
    And now instead of

    Code:
    Runtime  3:3
    You have

    Code:
    Runtime 3 minutes 3 seconds

    Here's what that looks like:

    http://www.otube.ca/view/2/drag-racing- ... s-desert-/

    Yes, it says "1 seconds" ... in the plural. No one cares. Everyone gets it. Will only occur on the very rare videos that happen to go exactly one second over a full minute of time.


    OR, if you are able, and insist on the MM:SS format, work up some kind of "if" statement that says "IF the runtime minutes =< 9, put a text '0' before displaying the seconds"

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

    Default

    yeah, I'd really really like it to read 3:03 but don't know scripting.
    If it's not fun, stop doing it!

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Runtime in s Fix to MM:SS
    By nikhom in forum Fixed Bugs
    Replies: 1
    Last Post: 12-23-2007, 06:54 AM
  2. Time in MINUTES AND SECONDS
    By grynmoors in forum Feature Requests
    Replies: 2
    Last Post: 11-09-2007, 12:16 AM
  3. Video duration in minutes and seconds
    By starapple in forum Fixed Bugs
    Replies: 2
    Last Post: 07-31-2007, 01:02 PM
  4. Feature Request: Show runtime in Minutes:Seconds
    By grynmoors in forum Feature Requests
    Replies: 1
    Last Post: 07-07-2007, 09:40 AM

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
  •