Re: Math Equation and Modifier
| From: | Andr� Rabold | Date: | Fri, 15 Nov 2002 10:09:32 +0000 |
| Subject: | Re: Math Equation and Modifier | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6439@lists.php.net to get a copy of this message | ||
Try this: (Notice the assign="size" within the {math} tag)
{math assign="size" equation="x * y"
x=$scriptsData[scripts].scriptLocation|filesize
y=$scriptsData[scripts].scriptDownloads}
{assign var="size" value=$size|convertFileSize}
Now you have your size in a template var $size.
Hope that helps,
André
"Eskil Kvalnes" <eskil@uten.net> schrieb im Newsbeitrag
news:000901c28c26$2d4c82b0$0a00000a@maya...
> Hi,
>
> I have a math equation ({math equation="x * y"
> x=$scriptsData[scripts].scriptLocation|filesize
> y=$scriptsData[scripts].scriptDownloads}) and
> I want to use my convertFileSize modifier on the end result. I've looked
> through the manual, but I can't seem to find what I'm looking for.
>
> Any ideas on how I can accomplish this?
>
> ---------------
> Sincerely,
> Eskil Kvalnes
> eskil@uten.net
>
>