Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Added data-filter-human_readable Vtpl filter
givanzb4a99611b10b
diff --git a/system/vtpl/vtpl.php b/system/vtpl/vtpl.phpindex 2a63ebb..1b65eac 100755--- a/system/vtpl/vtpl.php+++ b/system/vtpl/vtpl.php@@ -93,25 +93,26 @@ class Vtpl {private $variableFilters =[- 'capitalize' => 'ucfirst($$0)',- 'cdata' => 'CDATA_START . $$0. CDATA_END',- 'friendly_date' => 'Vvveb\friendlyDate($$0)',- 'truncate' => 'substr($$0, 0, $$1)',- 'truncate_words' => 'Vvveb\truncateWords($$0,$$1)',- 'replace' => 'str_replace($$1, $$2, $$0)',- 'uppercase' => 'strtoupper($$0)',- 'lowercase' => 'strtolower($$0)',- 'append' => '$$1 . $$0',- 'prepend' => '$$0 . $$1',- 'strip_html' => 'strip_tags($$0)',- 'strip_newlines' => 'str_replace("\n",\' \', $$0)',- 'mod' => ['tag', 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) {', 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) {'],- 'mod_class' => ['class', '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?>'],- 'conditional_class'=> ['class', '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?>'],- 'iteration_class' => ['class', '<?php if (@++$_iterc_@@__VTPL_rand()__@@ === (int)$$2) echo $$1;?>'],- 'number_format' => 'number_format($$0, $$1, $$2, $$3)',- 'only_decimals' => 'substr($$0, (($_strpos = strrpos($$0, \'.\')) !== false)?$_strpos + 1:-100, ($_strpos !== false)?10:false)',- 'without_decimals' => 'substr($$0, 0, strrpos($$0, \'.\'))',+ 'capitalize' => 'ucfirst($$0)',+ 'cdata' => 'CDATA_START . $$0. CDATA_END',+ 'friendly_date' => 'Vvveb\friendlyDate($$0)',+ 'human_readable' => 'Vvveb\humanReadable($$0)',+ 'truncate' => 'substr($$0, 0, $$1)',+ 'truncate_words' => 'Vvveb\truncateWords($$0,$$1)',+ 'replace' => 'str_replace($$1, $$2, $$0)',+ 'uppercase' => 'strtoupper($$0)',+ 'lowercase' => 'strtolower($$0)',+ 'append' => '$$1 . $$0',+ 'prepend' => '$$0 . $$1',+ 'strip_html' => 'strip_tags($$0)',+ 'strip_newlines' => 'str_replace("\n",\' \', $$0)',+ 'mod' => ['tag', 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) {', 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) {'],+ 'mod_class' => ['class', '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?>'],+ 'conditional_class' => ['class', '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?>'],+ 'iteration_class' => ['class', '<?php if (@++$_iterc_@@__VTPL_rand()__@@ === (int)$$2) echo $$1;?>'],+ 'number_format' => 'number_format($$0, $$1, $$2, $$3)',+ 'only_decimals' => 'substr($$0, (($_strpos = strrpos($$0, \'.\')) !== false)?$_strpos + 1:-100, ($_strpos !== false)?10:false)',+ 'without_decimals' => 'substr($$0, 0, strrpos($$0, \'.\'))',];private $attributesIndex = 0;