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. :)
Bookmarks