Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Documentation for the Format field
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Documentation for the Format field
#56700
Documentation for the Format field 8 Years, 10 Months ago Karma: 0
Is there any documentation about the parameters that can be used in Column settings>Format field? If found a couple of ad hoc examples here:
www.ari-soft.com/ARI-Data-Tables/55073-Format-view.html#55073 and here: www.ari-soft.com/ARI-Smart-Content/53632-PHP-code-in-format.html#53632 but I'm not sure if it's PHP, javascript, jquery or something else.

My immediate need is to format a number with a thousands separator. For example 30000 -> 30,000

Many thanks for the great extension and help.
Last Edit: 2016/01/09 16:48 By umbris.
The administrator has disabled public write access.
 
#56702
Re:Documentation for the Format field 8 Years, 10 Months ago Karma: 760
Hello,

"number_format" formatter is a wrapper for number_format and it accepts the same parameters. In your case use the following code:

{$value|number_format:2:,:.}

Regards,
ARI Soft
The administrator has disabled public write access.
 
#56703
Re:Documentation for the Format field 8 Years, 10 Months ago Karma: 0
Thank you for your quick reply. It turns out that what I actually needed was

Code:

{$value|number_format:0:.:,}



However, you didn't really answer my more important question about documentation. I realize that you probably don't want to sit down right now and bang out some good technical documents, but how about a short listing of what php format function are supported by wrappers. Also, a brief explanation of how to use regexreplace: and any other function wrappers that are supported.

If I'm not mistaken, it looks like this might be the starting point of a list of functions:

    class.UrlEncode.php
    class.UpperCase.php
    class.UniqueReplace.php
    class.Truncate.php
    class.StripTags.php
    class.RestoreTags.php
    class.Replace.php
    class.RegexReplace.php
    class.ParseIni.php
    class.NumberFormat.php
    class.LowerCase.php
    class.LoadAll.php
    class.JsonDecode.php
    class.HtmlTruncate.php
    class.Format.php
    class.FilterBase.php
    class.Filter.php
    class.Empty.php
    class.DBQuote.php
    class.DateFormat.php
    class.Base64Encode.php


All found here:

/modules/mod_aridatatables/includes/kernel/SimpleTemplate/Filters/

Thanks in advance!
The administrator has disabled public write access.
 
#56706
Re:Documentation for the Format field 8 Years, 10 Months ago Karma: 760
You are right. Filters which can be applied for values are located in modules/mod_aridatatables/includes/kernel/SimpleTemplate/Filters/ folder. Currently we don't have documentation for this.

RegexpReplace is a wrapper for preg_replace PHP function. It used in the following way:

{$value|regexreplace:find_pattern:replacement}

Where find_pattern is a regexp, replacement is the string to replace.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#56712
Re:Documentation for the Format field 8 Years, 10 Months ago Karma: 0
Thanks, that's very helpful. Here are a few more that I gleaned.

    {$value|lower_case} Converts value to lowercase

    {$value|upper_case} Converts value to uppercase

    {$value|replace:xxx:yyy} Replaces the string "xxx" with the string "yyy"
Last Edit: 2016/01/10 23:30 By umbris.
The administrator has disabled public write access.
 
Go to topPage: 1