New plugin
| From: | Patrick Emond | Date: | Tue, 27 May 2003 09:12:05 +0000 |
| Subject: | New plugin | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1513@lists.php.net to get a copy of this message | ||
Hi folks,
I've attached a new modifier plugin that I thought some of you may find handy. It rounds a
number to two orders of significance and adds it's size prefix (similar to adding the -h option
to an linux ls command). It supports up to a Yotta (1e24) in size.
For example:
13990 -> 14.0K
4520000 -> 4.5M
123 -> 123
etc.
Simply use like any other modifier: {$variable|size_postfix}
The name isn't so good so if anyone can think of anything better to call it please let me know.
--
Patrick Emond <patrickemond@softhome.net>