Modifier
Table of Contents
- smarty_modifier_address() : string
- Smarty {address} modifier plugin
- smarty_modifier_array_lookup() : string
- Smarty {array_lookup} modifier plugin
- smarty_modifier_brightness() : string
- Smarty {brightness} modifier plugin
- smarty_modifier_bytes() : string
- Smarty {bytes} modifier plugin
- smarty_modifier_contrast() : string
- Smarty {contrast} modifier plugin
- smarty_modifier_convertlangcode() : string
- Smarty {convertlangcode} modifier plugin
- smarty_modifier_countryname() : string
- Smarty {countryname} modifier plugin
- smarty_modifier_currency() : string
- Smarty {currency} modifier plugin
- smarty_modifier_expdate() : string
- Smarty {expdate} modifier plugin
- smarty_modifier_format() : string
- Smarty {format} modifier plugin
- smarty_modifier_format_date() : string
- Smarty {format_date} modifier plugin
- smarty_modifier_format_tooltip() : string
- Smarty {format_tooltip} modifier plugin
- smarty_modifier_getcontrollerdisplayname() : string
- Smarty {getcontrollerdisplayname} modifier plugin
- smarty_modifier_getcontrollername() : string
- Smarty {getcontrollername} modifier plugin
- smarty_modifier_gettext() : string
- Smarty {gettext} modifier plugin
- smarty_modifier_gettxtlist() : string
- Smarty {gettxtlist} modifier plugin
- smarty_modifier_groupname() : string
- Smarty {groupname} modifier plugin
- smarty_modifier_hide_email() : string
- Smarty {hide_email} modifier plugin
- smarty_modifier_highlight() : string
- Smarty {highlight} modifier plugin
- smarty_modifier_is_logged_in() : bool
- Smarty {is_logged_in} modifier plugin
- smarty_modifier_kilobytes() : string
- Smarty {kilobytes} modifier plugin
- smarty_modifier_megabytes() : string
- Smarty {kilobytes} modifier plugin
- smarty_modifier_nobreak() : string
- Smarty {nobreak} modifier plugin
- smarty_modifier_not_bs() : string
- Smarty {kilobytes} modifier plugin
- smarty_modifier_number_format() : string
- Smarty {number_format} modifier plugin
- smarty_modifier_plural() : string
- Smarty {plural} modifier plugin
- smarty_modifier_relative_date() : string
- Smarty {relative_date} modifier plugin Type: modifier<br> Name: relative_date<br> Purpose: convert a date in a relative format
- smarty_modifier_remove_space() : string
- Smarty {remove_space} modifier plugin
- smarty_modifier_reverse_array() : array<string|int, mixed>
- Smarty {reverse_array} modifier plugin
- smarty_modifier_signature() : string
- Smarty {signature} modifier plugin Type: modifier<br> Name: signature<br> Purpose: return the stored signature for a user id if available
- smarty_modifier_statename() : string
- Smarty {statename} modifier plugin
- smarty_modifier_urlencode() : string
- Smarty {urlencode} modifier plugin
- smarty_modifier_username() : string
- Smarty {username} modifier plugin Type: modifier<br> Name: username<br> Purpose: return the username for a user id
Functions
smarty_modifier_address()
Smarty {address} modifier plugin
smarty_modifier_address(mixed $address) : string
Type: modifier
Name: address
Purpose: return an address display from an id
Parameters
- $address : mixed
Tags
Return values
string —smarty_modifier_array_lookup()
Smarty {array_lookup} modifier plugin
smarty_modifier_array_lookup([string $value = '' ][, array<string|int, mixed> $from = array() ], int $index) : string
Type: modifier
Name: array_lookup
Purpose: lookup a key within an array
Parameters
- $value : string = ''
- $from : array<string|int, mixed> = array()
- $index : int
Tags
Return values
string —smarty_modifier_brightness()
Smarty {brightness} modifier plugin
smarty_modifier_brightness([string $colourstr = '' ][, int $steps = 20 ]) : string
Type: modifier
Name: brightness
Purpose: Calculate a lighter/darker color from the one passed
+- 255 steps, default is 20 steps brighter
Parameters
- $colourstr : string = ''
- $steps : int = 20
Tags
Return values
string —smarty_modifier_bytes()
Smarty {bytes} modifier plugin
smarty_modifier_bytes(mixed $bytes) : string
Type: modifier
Name: bytes
Purpose: convert to mega/kilo/bytes
Parameters
- $bytes : mixed
Tags
Return values
string —smarty_modifier_contrast()
Smarty {contrast} modifier plugin
smarty_modifier_contrast(string $hexcolor[, string $dark = '000000' ][, string $light = 'FFFFFF' ][, bool $yiq = false ]) : string
Type: modifier
Name: contrast
Purpose: Calculate a contrasting/complementary color from the one passed
using either the default 50% rule or YIQ
Parameters
- $hexcolor : string
- $dark : string = '000000'
- $light : string = 'FFFFFF'
- $yiq : bool = false
Tags
Return values
string —smarty_modifier_convertlangcode()
Smarty {convertlangcode} modifier plugin
smarty_modifier_convertlangcode( $lang_code[, string $target = "iso639-1" ]) : string
Type: modifier
Name: convertlangcode
Purpose: attempt to convert language codes between different formats
Parameters
Tags
Return values
string —smarty_modifier_countryname()
Smarty {countryname} modifier plugin
smarty_modifier_countryname(mixed $country[, string $col = 'name' ]) : string
Type: modifier
Name: countryname
Purpose: lookup a country's name based a country id
Parameters
- $country : mixed
- $col : string = 'name'
Tags
Return values
string —smarty_modifier_currency()
Smarty {currency} modifier plugin
smarty_modifier_currency( $number[, $decimals = 2 ]) : string
Type: modifier
Name: currency
Purpose: format a number as currency
Parameters
Tags
Return values
string —smarty_modifier_expdate()
Smarty {expdate} modifier plugin
smarty_modifier_expdate( $timestamp, $format) : string
Type: modifier
Name: expdate
Purpose: Format a string according to the given format
Parameters
Tags
Return values
string —smarty_modifier_format()
Smarty {format} modifier plugin
smarty_modifier_format(mixed $string[, string $format = null ]) : string
Type: modifier
Name: format
Purpose: format a string to a date (system) or currency
Parameters
- $string : mixed
- $format : string = null
Tags
Return values
string —smarty_modifier_format_date()
Smarty {format_date} modifier plugin
smarty_modifier_format_date(mixed $timestamp[, string $format = DISPLAY_DATE_FORMAT ]) : string
Type: modifier
Name: format_date
Purpose: format a date
Parameters
- $timestamp : mixed
- $format : string = DISPLAY_DATE_FORMAT
Tags
Return values
string —smarty_modifier_format_tooltip()
Smarty {format_tooltip} modifier plugin
smarty_modifier_format_tooltip([string $text = '' ][, int $length = 77 ]) : string
Type: modifier
Name: format_tooltip
Purpose: shorten and strip a string
Parameters
- $text : string = ''
- $length : int = 77
Tags
Return values
string —smarty_modifier_getcontrollerdisplayname()
Smarty {getcontrollerdisplayname} modifier plugin
smarty_modifier_getcontrollerdisplayname(string $str) : string
Type: modifier
Name: getcontrollerdisplayname
Purpose: Return the module display name for this module
Parameters
- $str : string
Tags
Return values
string —smarty_modifier_getcontrollername()
Smarty {getcontrollername} modifier plugin
smarty_modifier_getcontrollername(string $str) : string
Type: modifier
Name: getcontrollername
Purpose: Return the module name for this module
Parameters
- $str : string
Tags
Return values
string —smarty_modifier_gettext()
Smarty {gettext} modifier plugin
smarty_modifier_gettext(string $str) : string
Type: modifier
Name: gettext
Purpose: Replace with the chosen language for this text
Parameters
- $str : string
Tags
Return values
string —smarty_modifier_gettxtlist()
Smarty {gettxtlist} modifier plugin
smarty_modifier_gettxtlist(string $str) : string
Type: modifier
Name: gettxtlist
Purpose: Replace comma separated list with the chosen language for the text
Parameters
- $str : string
Tags
Return values
string —smarty_modifier_groupname()
Smarty {groupname} modifier plugin
smarty_modifier_groupname(mixed $groupid) : string
Type: modifier
Name: groupname
Purpose: return the group name for a group id
Parameters
- $groupid : mixed
Tags
Return values
string —smarty_modifier_hide_email()
Smarty {hide_email} modifier plugin
smarty_modifier_hide_email(mixed $string) : string
Type: modifier
Name: hide_email
Purpose: obfuscate an email address
Parameters
- $string : mixed
Tags
Return values
string —smarty_modifier_highlight()
Smarty {highlight} modifier plugin
smarty_modifier_highlight([string $text = '' ][, string $word = '' ][, string $highlight = 'html5' ]) : string
Type: modifier
Name: highlight
Purpose: highlight selected phrases in text
Parameters
- $text : string = ''
- $word : string = ''
-
phrase(s) to highlight
- $highlight : string = 'html5'
-
type of highlight (style/class) to place inside tag
Tags
Return values
string —smarty_modifier_is_logged_in()
Smarty {is_logged_in} modifier plugin
smarty_modifier_is_logged_in(mixed $string) : bool
Type: modifier
Name: is_logged_in
Purpose: determine if user is logged in
Parameters
- $string : mixed
Tags
Return values
bool —smarty_modifier_kilobytes()
Smarty {kilobytes} modifier plugin
smarty_modifier_kilobytes(mixed $bytes) : string
Type: modifier
Name: kilobytes
Purpose: convert to kilobytes
Parameters
- $bytes : mixed
Tags
Return values
string —smarty_modifier_megabytes()
Smarty {kilobytes} modifier plugin
smarty_modifier_megabytes(mixed $bytes) : string
Type: modifier
Name: kilobytes
Purpose: convert to kilobytes
Parameters
- $bytes : mixed
Tags
Return values
string —smarty_modifier_nobreak()
Smarty {nobreak} modifier plugin
smarty_modifier_nobreak(mixed $string) : string
Type: modifier
Name: nobreak
Purpose: replace spaces with non-breaking spaces
Parameters
- $string : mixed
Tags
Return values
string —smarty_modifier_not_bs()
Smarty {kilobytes} modifier plugin
smarty_modifier_not_bs(mixed $text) : string
Type: modifier
Name: kilobytes
Purpose: convert to kilobytes
Parameters
- $text : mixed
Tags
Return values
string —smarty_modifier_number_format()
Smarty {number_format} modifier plugin
smarty_modifier_number_format( $number, $decimals) : string
Type: modifier
Name: number_format
Purpose: format a number
Parameters
Tags
Return values
string —smarty_modifier_plural()
Smarty {plural} modifier plugin
smarty_modifier_plural([string $word = '' ], int $counter) : string
Type: modifier
Name: plural
Purpose: pluralize a string
Parameters
- $word : string = ''
- $counter : int
Tags
Return values
string —smarty_modifier_relative_date()
Smarty {relative_date} modifier plugin Type: modifier<br> Name: relative_date<br> Purpose: convert a date in a relative format
smarty_modifier_relative_date(mixed $timestamp) : string
Parameters
- $timestamp : mixed
Tags
Return values
string —smarty_modifier_remove_space()
Smarty {remove_space} modifier plugin
smarty_modifier_remove_space(mixed $string) : string
Type: modifier
Name: remove_space
Purpose: remove spaces, replacing them with underscores
Parameters
- $string : mixed
Tags
Return values
string —smarty_modifier_reverse_array()
Smarty {reverse_array} modifier plugin
smarty_modifier_reverse_array(mixed $array) : array<string|int, mixed>
Type: modifier
Name: reverse_array
Purpose: reverse arrays
Parameters
- $array : mixed
Tags
Return values
array<string|int, mixed> —smarty_modifier_signature()
Smarty {signature} modifier plugin Type: modifier<br> Name: signature<br> Purpose: return the stored signature for a user id if available
smarty_modifier_signature(int $userid[, mixed $header = false ]) : string
Parameters
- $userid : int
- $header : mixed = false
Tags
Return values
string —smarty_modifier_statename()
Smarty {statename} modifier plugin
smarty_modifier_statename(mixed $state[, string $col = 'name' ]) : string
Type: modifier
Name: statename
Purpose: lookup a state's name based o state id
Parameters
- $state : mixed
- $col : string = 'name'
Tags
Return values
string —smarty_modifier_urlencode()
Smarty {urlencode} modifier plugin
smarty_modifier_urlencode( $string[, $ignore_whitespace = false ]) : string
Type: modifier
Name: urlencode
Purpose: urlencode a string
Parameters
Tags
Return values
string —smarty_modifier_username()
Smarty {username} modifier plugin Type: modifier<br> Name: username<br> Purpose: return the username for a user id
smarty_modifier_username( $userid[, bool $type = null ]) : string