Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] new modifier: number_format
--- 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
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Boots
08-04-04 09:02 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.