Index: trunk/typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- trunk/typo3/sysext/cms/tslib/class.tslib_content.php (revision 7150) +++ trunk/typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -3763,6 +3763,9 @@ if ($conf['prioriCalc']){$content=t3lib_div::calcParenthesis($content); if ($conf['prioriCalc']=='intval') $content=intval($content);} if ((string)$conf['char']!=''){$content=chr(intval($conf['char']));} if ($conf['intval']){$content=intval($content);} + if ($conf['numberFormat.']) { + $content = $this->numberFormat($content, $conf['numberFormat']); + } if ($conf['date']){$content=date($conf['date'], $content);} if ($conf['strftime']){ $content = strftime($conf['strftime'], $content); @@ -4780,6 +4783,21 @@ } return $content; } + + /** + * Implements the stdWrap property "numberFormat" + * This is a Wrapper function for php's number_format() + * + * @param float Value to process + * @param array TypoScript Configuration for numberFormat + * @return string The formated number + */ + function numberFormat($content, $conf) { + $decimals = $this->stdWrap($conf['decimals'], $conf['decimals.']); + $dec_point = $this->stdWrap($conf['dec_point'], $conf['dec_point.']); + $thousands_sep = $this->stdWrap($conf['thousands_sep'], $conf['thousands_sep.']); + return number_format($content, $decimals, $dec_point, $thousands_sep); + } /** * Implements the stdWrap property, "parseFunc".