|
| --- Paul Ardeleanu <pardeleanu@yahoo.com> wrote:
> Hi all!
> May I submit for addition a new modifier? I've write it in order to
> display number in english notation.
FYI: Strictly, this isn't necessary as you can use PHP functions as
modifiers and this one is wrapping the PHP function 1:1.
xo boots
> Here it is:
>
> <?php
> /**
> * Smarty plugin
> * @package Smarty
> * @subpackage plugins
> */
>
>
> /**
> * Smarty number_format modifier plugin
> *
> * Type: modifier<br>
> * Name: number_format<br>
> * Purpose: format number via number_format
> * @link
> http://smarty.php.net/manual/en/lan...mber.format.php
> * number_format (Smarty online manual)
> * @param float
> * @param int
> * @param string
> * @param string
> * @return string
> */
> function smarty_modifier_number_format($number, $decimals=2,
> $dec_point='.', $thousands_sep='')
> {
> return number_format($number, $decimals, $dec_point,
> $thousands_sep);
> }
>
> /* vim: set expandtab: */
>
> ?>
>
> Thanks,
> Paul
>
>
>
>
>
>
> ________________________________________
___________________ALL-NEW
> Yahoo! Messenger - all new features - even more fun!
> http://uk.messenger.yahoo.com
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
|
|