Number Formatter

Developer

Douglas Green

3rd Party (Free)

49 downloads (last 90 days)

Creative Commons Attribution No Derivatives Download v1.0

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Sends a value through the PHP number_format() function, and returns a formatted number.

The Number Formatter plugin accepts a value as a number, runs it through the PHP number_format() function, and returns the formatted result.

Basic usage:

{exp:number_formatter:format}
{value}
{/exp:number_formatter:format}

The plugin accepts the following parameters, which correspond with the PHP number_format() function parameters:

- number: number to be formatted, passed as value between opening and closing plugin tags, required
- decimals: number of decimal points, optional, 0 by default
- dec_point: decimal point separator, optional, ‘.’ by default
- thousands_sep: thousands separator, optional, ‘,’ by default

As with the PHP function, pass a number alone, a number and the number of decimals, or all 4 parameters. 3 parameters are not accepted.

Plugin with parameters:

{exp:number_formatter:format decimals='2' dec_point='.' thousands_sep=','}
{value}
{/exp:number_formatter:format}

Download Number Formatter

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.0 Aug 28, 2012

This entry was created August 30, 2012, 9:19 am.
This entry was last updated August 30, 2012, 4:21 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

1 Review:

MajesticIX 05.24.13

MajesticIX
Rating - {addon_rating_average}

Simple plugin but it works. Was combining this with an EE SQL query and required formatting a number using an EE variable which wouldn’t work with a simple PHP injection without hackery. Problem solved. Thanks.