2008-09-20 10:00:00 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Smarty plugin
|
|
|
|
* @package Smarty
|
|
|
|
* @subpackage plugins
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-11-15 16:12:18 +00:00
|
|
|
* Smarty plugin
|
2008-09-20 10:00:00 +00:00
|
|
|
*
|
|
|
|
* Type: modifier<br>
|
|
|
|
* Name: separenombre<br>
|
|
|
|
* Date: Aug 22, 2008
|
|
|
|
* Purpose: separe number
|
2020-11-15 16:12:18 +00:00
|
|
|
* Example: {$text|separenombre}
|
2008-09-20 10:00:00 +00:00
|
|
|
* @version 1.0
|
|
|
|
* @author Nemunaire <nemunaire at gmail dot com>
|
2020-11-15 16:12:18 +00:00
|
|
|
* @param string
|
2008-09-20 10:00:00 +00:00
|
|
|
* @return string
|
|
|
|
*/
|
2020-11-15 16:12:18 +00:00
|
|
|
function smarty_modifier_separerNombres($string)
|
2008-09-20 10:00:00 +00:00
|
|
|
{
|
2020-11-15 16:12:18 +00:00
|
|
|
return number_format(floor($string), 0, ',', ' ');
|
2008-09-20 10:00:00 +00:00
|
|
|
}
|
|
|
|
|
2020-11-15 16:12:18 +00:00
|
|
|
/* vim: set expandtab: */
|