Function Summary | |
---|---|
void | _smarty_regex_replace_check(mixed search) |
string | smarty_block_textformat(mixed params, mixed content, mixed smarty, array , string contents, Smarty clever) |
void | smarty_compiler_assign(mixed tag_attrs, mixed compiler, string containing, Smarty_Compiler ) Smarty {assign} compiler function pluginType: compiler function Name: assign Purpose: assign a value to a template variable |
string|false | smarty_core_assemble_plugin_filepath(mixed params, mixed smarty, string type, string name) assemble filepath of requested plugin |
void | smarty_core_assign_smarty_interface(mixed params, mixed smarty, array Format:, Smarty ) Smarty assign_smarty_interface core pluginType: core Name: assign_smarty_interface Purpose: assign the $smarty interface variable |
void | smarty_core_create_dir_structure(mixed params, mixed smarty, string dir) create full directory structure |
void | smarty_core_display_debug_console(mixed params, mixed smarty, array Format:, Smarty ) Smarty debug_console function pluginType: core Name: display_debug_console Purpose: display the javascript debug console window |
boolean | smarty_core_get_include_path(mixed params, mixed smarty, string file_path, string new_file_path) Get path to file from include_path |
double | smarty_core_get_microtime(mixed params, mixed smarty) Get seconds and microseconds |
boolean | smarty_core_get_php_resource(mixed params, mixed smarty, string resource, string resource_type, $php_resource ) Retrieves PHP script resourcesets $php_resource to the returned resource |
boolean | smarty_core_is_secure(mixed params, mixed smarty, string resource_type, string resource_name) determines if a resource is secure or not. |
boolean | smarty_core_is_trusted(mixed params, mixed smarty, string resource_type, string resource_name) determines if a resource is trusted or not |
void | smarty_core_load_plugins(mixed params, mixed smarty, array plugins) Load requested plugins |
void | smarty_core_load_resource_plugin(mixed params, mixed smarty, string type) load a resource plugin |
string | smarty_core_process_cached_inserts(mixed params, mixed smarty, string results) Replace cached inserts with the actual results |
boolean | smarty_core_read_cache_file(mixed params, mixed smarty, string tpl_file, string cache_id, string compile_id, string results) read a cache file, determine if it needs to be regenerated or not |
boolean | smarty_core_rm_auto(mixed params, mixed smarty, string auto_base, string auto_source, string auto_id, integer exp_time) delete an automagically created file by name and id |
boolean | smarty_core_rmdir(mixed params, mixed smarty, string dirname, integer level, integer exp_time) delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it! |
string | smarty_core_run_insert_handler(mixed params, mixed smarty, array args) Handle insert tags |
void | smarty_core_smarty_include_php(mixed params, mixed smarty, string smarty_file, string smarty_assign, boolean smarty_once, array smarty_include_vars) called for included php files within templates |
true|null | smarty_core_write_cache_file(mixed params, mixed smarty, string tpl_file, string cache_id, string compile_id, string results) Prepend the cache information to the cache file and write it |
boolean | smarty_core_write_file(mixed params, mixed smarty, string filename, string contents, boolean create_dirs) write out a file to disk |
void | smarty_function_assign_debug_info(mixed params, mixed smarty, array unused, Smarty ) Smarty {assign_debug_info} function pluginType: function Name: assign_debug_info Purpose: assign debug info to the template |
void | smarty_function_config_load(mixed params, mixed smarty, array Format:, Smarty ) Smarty {config_load} function pluginType: function Name: config_load Purpose: load config file vars |
string|null | smarty_function_counter(mixed params, mixed smarty, array parameters, Smarty ) Smarty {counter} function pluginType: function Name: counter Purpose: print out a counter value |
string|null | smarty_function_cycle(mixed params, mixed smarty, Smarty ) Smarty {cycle} function pluginType: function Name: cycle Date: May 3, 2002 Purpose: cycle through given values Input: - name = name of cycle (optional) - values = comma separated list of values to cycle, or an array of values to cycle (this can be left out for subsequent calls) - reset = boolean - resets given var to true - print = boolean - print var or not. |
string | smarty_function_debug(mixed params, mixed smarty, Smarty ) Smarty {debug} function pluginType: function Name: debug Date: July 1, 2002 Purpose: popup debug window |
string | smarty_function_escape_special_chars(mixed string, string ) escape_special_chars common functionFunction: smarty_function_escape_special_chars Purpose: used by other smarty functions to escape special chars except for already escaped ones |
void | smarty_function_eval(mixed params, mixed smarty, Smarty ) Smarty {eval} function pluginType: function Name: eval Purpose: evaluate a template variable as a template |
string|null | smarty_function_fetch(mixed params, mixed smarty, Smarty ) Smarty {fetch} pluginType: function Name: fetch Purpose: fetch file, web or ftp data and display results |
string | smarty_function_html_checkboxes(mixed params, mixed smarty, Smarty ) Smarty {html_checkboxes} function pluginFile: function.html_checkboxes.php Type: function Name: html_checkboxes Date: 24.Feb.2003 Purpose: Prints out a list of checkbox input types Input: - name (optional) - string default "checkbox" - values (required) - array - options (optional) - associative array - checked (optional) - array default not set - separator (optional) - ie or - output (optional) - the output next to each checkbox - assign (optional) - assign the output as an array to this variable Examples: {html_checkboxes values=$ids output=$names} {html_checkboxes values=$ids name='box' separator='' output=$names} {html_checkboxes values=$ids checked=$checked separator='' output=$names} |
void | smarty_function_html_checkboxes_output(mixed name, mixed value, mixed output, mixed selected, mixed extra, mixed separator, mixed labels) |
string | smarty_function_html_image(mixed params, mixed smarty, Smarty ) Smarty {html_image} function pluginType: function Name: html_image Date: Feb 24, 2003 Purpose: format HTML tags for the image Input: - file = file (and path) of image (required) - height = image height (optional, default actual height) - width = image width (optional, default actual width) - basedir = base directory for absolute paths, default is environment variable DOCUMENT_ROOT - path_prefix = prefix for path output (optional, default empty)Examples: {html_image file="/images/masthead.gif"} Output: |
string | smarty_function_html_options(mixed params, mixed smarty, Smarty ) Smarty {html_options} function pluginType: function Name: html_options Input: - name (optional) - string default "select" - values (required if no options supplied) - array - options (required if no values supplied) - associative array - selected (optional) - string default not set - output (required if not options supplied) - array Purpose: Prints the list of tags generated from the passed parameters |
void | smarty_function_html_options_optgroup(mixed key, mixed values, mixed selected) |
void | smarty_function_html_options_optoutput(mixed key, mixed value, mixed selected) |
string | smarty_function_html_radios(mixed params, mixed smarty, Smarty ) Smarty {html_radios} function pluginFile: function.html_radios.php Type: function Name: html_radios Date: 24.Feb.2003 Purpose: Prints out a list of radio input types Input: - name (optional) - string default "radio" - values (required) - array - options (optional) - associative array - checked (optional) - array default not set - separator (optional) - ie or - output (optional) - the output next to each radio button - assign (optional) - assign the output as an array to this variable Examples: {html_radios values=$ids output=$names} {html_radios values=$ids name='box' separator='' output=$names} {html_radios values=$ids checked=$checked separator='' output=$names} |
void | smarty_function_html_radios_output(mixed name, mixed value, mixed output, mixed selected, mixed extra, mixed separator, mixed labels, mixed label_ids) |
string | smarty_function_html_select_date(mixed params, mixed smarty, Smarty ) Smarty {html_select_date} pluginType: function Name: html_select_date Purpose: Prints the dropdowns for date selection. |
string | smarty_function_html_select_time(mixed params, mixed smarty, Smarty ) Smarty {html_select_time} function pluginType: function Name: html_select_time Purpose: Prints the dropdowns for time selection |
string | smarty_function_html_table(mixed params, mixed smarty, Smarty ) Smarty {html_table} function pluginType: function Name: html_table Date: Feb 17, 2003 Purpose: make an html table from an array of data Input: - loop = array to loop through - cols = number of columns, comma separated list of column names or array of column names - rows = number of rows - table_attr = table attributes - th_attr = table heading attributes (arrays are cycled) - tr_attr = table row attributes (arrays are cycled) - td_attr = table cell attributes (arrays are cycled) - trailpad = value to pad trailing cells with - caption = text for caption element - vdir = vertical direction (default: "down", means top-to-bottom) - hdir = horizontal direction (default: "right", means left-to-right) - inner = inner loop (default "cols": print $loop line by line, $loop will be printed column by column otherwise) Examples: {table loop=$data} {table loop=$data cols=4 tr_attr='"bgcolor=red"'} {table loop=$data cols="first,second,third" tr_attr=$colors} |
void | smarty_function_html_table_cycle(mixed name, mixed var, mixed no) |
string | smarty_function_mailto(mixed params, mixed smarty, Smarty ) Smarty {mailto} function pluginType: function Name: mailto Date: May 21, 2002 Purpose: automate mailto address link creation, and optionally encode them. Input: - address = e-mail address - text = (optional) text to display, default is address - encode = (optional) can be one of: none : no encoding (default) javascript : encode with javascript javascript_charcode : encode with javascript charcode hex : encode with hexidecimal (no javascript) - cc = (optional) address(es) to carbon copy - bcc = (optional) address(es) to blind carbon copy - subject = (optional) e-mail subject - newsgroups = (optional) newsgroup(s) to post to - followupto = (optional) address(es) to follow up to - extra = (optional) extra tags for the href linkExamples: {mailto address="me@domain.com"} {mailto address="me@domain.com" encode="javascript"} {mailto address="me@domain.com" encode="hex"} {mailto address="me@domain.com" subject="Hello to you!"} {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"} {mailto address="me@domain.com" extra='class="mailto"'} |
string | smarty_function_math(mixed params, mixed smarty, Smarty ) Smarty {math} function pluginType: function Name: math Purpose: handle math computations in template |
string | smarty_function_popup(mixed params, mixed smarty, Smarty ) Smarty {popup} function pluginType: function Name: popup Purpose: make text pop up in windows via overlib |
string | smarty_function_popup_init(mixed params, mixed smarty, Smarty ) Smarty {popup_init} function pluginType: function Name: popup_init Purpose: initialize overlib |
string | smarty_make_timestamp(mixed string, string ) Function: smarty_make_timestamp Purpose: used by other smarty functions to make a timestamp from a string. |
string | smarty_modifier_capitalize(mixed string, mixed uc_digits, string ) Smarty capitalize modifier pluginType: modifier Name: capitalize Purpose: capitalize words in the string |
void | smarty_modifier_capitalize_ucfirst(mixed string, mixed uc_digits) |
string | smarty_modifier_cat(mixed string, mixed cat, string ) Smarty cat modifier pluginType: modifier Name: cat Date: Feb 24, 2003 Purpose: catenate a value to a variable Input: string to catenate Example: {$var|cat:"foo"} |
integer | smarty_modifier_count_characters(mixed string, mixed include_spaces, string , boolean include) Smarty count_characters modifier pluginType: modifier Name: count_characteres Purpose: count the number of characters in a text |
integer | smarty_modifier_count_paragraphs(mixed string, string ) Smarty count_paragraphs modifier pluginType: modifier Name: count_paragraphs Purpose: count the number of paragraphs in a text |
integer | smarty_modifier_count_sentences(mixed string, string ) Smarty count_sentences modifier pluginType: modifier Name: count_sentences Purpose: count the number of sentences in a text |
integer | smarty_modifier_count_words(mixed string, string ) Smarty count_words modifier pluginType: modifier Name: count_words Purpose: count the number of words in a text |
string|void | smarty_modifier_date_format(mixed string, mixed format, mixed default_date, string ) Smarty date_format modifier pluginType: modifier Name: date_format Purpose: format datestamps via strftime Input: - string: input date string - format: strftime format for output - default_date: default date if $string is empty |
string | smarty_modifier_debug_print_var(mixed var, mixed depth, mixed length, integer ) Smarty debug_print_var modifier pluginType: modifier Name: debug_print_var Purpose: formats variable contents for display in the console |
string | smarty_modifier_default(mixed string, mixed default, string ) Smarty default modifier pluginType: modifier Name: default Purpose: designate default value for empty variables |
string | smarty_modifier_escape(mixed string, mixed esc_type, mixed char_set, html|htmlall|url|quotes|hex|hexentity|javascript ) Smarty escape modifier pluginType: modifier Name: escape Purpose: Escape the string according to escapement type |
string | smarty_modifier_indent(mixed string, mixed chars, mixed char, string ) Smarty indent modifier pluginType: modifier Name: indent Purpose: indent lines of text |
string | smarty_modifier_lower(mixed string, string ) Smarty lower modifier pluginType: modifier Name: lower Purpose: convert string to lowercase |
string | smarty_modifier_nl2br(mixed string, string ) Smarty pluginType: modifier Name: nl2br Date: Feb 26, 2003 Purpose: convert \r\n, \r or \n to Input: - contents = contents to replace - preceed_test = if true, includes preceeding break tags in replacement Example: {$text|nl2br} |
string | smarty_modifier_regex_replace(mixed string, mixed search, mixed replace, string|array ) Smarty regex_replace modifier pluginType: modifier Name: regex_replace Purpose: regular expression search/replace |
string | smarty_modifier_replace(mixed string, mixed search, mixed replace, string ) Smarty replace modifier pluginType: modifier Name: replace Purpose: simple search/replace |
string | smarty_modifier_spacify(mixed string, mixed spacify_char, string ) Smarty spacify modifier pluginType: modifier Name: spacify Purpose: add spaces between characters in a string |
string | smarty_modifier_string_format(mixed string, mixed format, string ) Smarty string_format modifier pluginType: modifier Name: string_format Purpose: format strings via sprintf |
string | smarty_modifier_strip(mixed text, mixed replace, string ) Smarty strip modifier pluginType: modifier Name: strip Purpose: Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string. Example: {$var|strip} {$var|strip:" "} Date: September 25th, 2002 |
string | smarty_modifier_strip_tags(mixed string, mixed replace_with_space, boolean ) Smarty strip_tags modifier pluginType: modifier Name: strip_tags Purpose: strip html tags from text |
string | smarty_modifier_truncate(mixed string, mixed length, mixed etc, mixed break_words, mixed middle, boolean ) Smarty truncate modifier pluginType: modifier Name: truncate Purpose: Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string or inserting $etc into the middle. |
string | smarty_modifier_upper(mixed string, string ) Smarty upper modifier pluginType: modifier Name: upper Purpose: convert string to uppercase |
string | smarty_modifier_wordwrap(mixed string, mixed length, mixed break, mixed cut, boolean ) Smarty wordwrap modifier pluginType: modifier Name: wordwrap Purpose: wrap a string of text at a given length |
void | smarty_outputfilter_trimwhitespace(mixed source, mixed smarty, Smarty ) Smarty trimwhitespace outputfilter pluginFile: outputfilter.trimwhitespace.php Type: outputfilter Name: trimwhitespace Date: Jan 25, 2003 Purpose: trim leading white space and blank lines from template source after it gets interpreted, cleaning up code and saving bandwidth. |
void | smarty_outputfilter_trimwhitespace_replace(mixed search_str, mixed replace, mixed subject) |
public void _smarty_regex_replace_check(mixed search)
public string smarty_block_textformat(mixed params, mixed content, mixed smarty, array , string contents, Smarty clever)
Smarty {textformat}{/textformat} block plugin
Type: block function
Name: textformat
Purpose: format text a certain way with preset styles
or custom wrap/indent settings
{textformat} (Smarty online manual)
- Params: style: string (email) indent: integer (0) wrap: integer (80) wrap_char string ("\n") indent_char: string (" ") wrap_boundary: boolean (true)
public void smarty_compiler_assign(mixed tag_attrs, mixed compiler, string containing, Smarty_Compiler )
Smarty {assign} compiler function plugin
Type: compiler function
Name: assign
Purpose: assign a value to a template variable
{assign} (Smarty online manual)
public string|false smarty_core_assemble_plugin_filepath(mixed params, mixed smarty, string type, string name)
assemble filepath of requested plugin
public void smarty_core_assign_smarty_interface(mixed params, mixed smarty, array Format:, Smarty )
Smarty assign_smarty_interface core plugin
Type: core
Name: assign_smarty_interface
Purpose: assign the $smarty interface variable
public void smarty_core_create_dir_structure(mixed params, mixed smarty, string dir)
create full directory structure
public void smarty_core_display_debug_console(mixed params, mixed smarty, array Format:, Smarty )
Smarty debug_console function plugin
Type: core
Name: display_debug_console
Purpose: display the javascript debug console window
public boolean smarty_core_get_include_path(mixed params, mixed smarty, string file_path, string new_file_path)
Get path to file from include_path
public double smarty_core_get_microtime(mixed params, mixed smarty)
Get seconds and microseconds
public boolean smarty_core_get_php_resource(mixed params, mixed smarty, string resource, string resource_type, $php_resource )
Retrieves PHP script resource
sets $php_resource to the returned resource
public boolean smarty_core_is_secure(mixed params, mixed smarty, string resource_type, string resource_name)
determines if a resource is secure or not.
public boolean smarty_core_is_trusted(mixed params, mixed smarty, string resource_type, string resource_name)
determines if a resource is trusted or not
public void smarty_core_load_plugins(mixed params, mixed smarty, array plugins)
Load requested plugins
public void smarty_core_load_resource_plugin(mixed params, mixed smarty, string type)
load a resource plugin
public string smarty_core_process_cached_inserts(mixed params, mixed smarty, string results)
Replace cached inserts with the actual results
public boolean smarty_core_read_cache_file(mixed params, mixed smarty, string tpl_file, string cache_id, string compile_id, string results)
read a cache file, determine if it needs to be regenerated or not
public boolean smarty_core_rm_auto(mixed params, mixed smarty, string auto_base, string auto_source, string auto_id, integer exp_time)
delete an automagically created file by name and id
public boolean smarty_core_rmdir(mixed params, mixed smarty, string dirname, integer level, integer exp_time)
delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!
public string smarty_core_run_insert_handler(mixed params, mixed smarty, array args)
Handle insert tags
public void smarty_core_smarty_include_php(mixed params, mixed smarty, string smarty_file, string smarty_assign, boolean smarty_once, array smarty_include_vars)
called for included php files within templates
public true|null smarty_core_write_cache_file(mixed params, mixed smarty, string tpl_file, string cache_id, string compile_id, string results)
Prepend the cache information to the cache file and write it
public boolean smarty_core_write_file(mixed params, mixed smarty, string filename, string contents, boolean create_dirs)
write out a file to disk
public void smarty_function_assign_debug_info(mixed params, mixed smarty, array unused, Smarty )
Smarty {assign_debug_info} function plugin
Type: function
Name: assign_debug_info
Purpose: assign debug info to the template
public void smarty_function_config_load(mixed params, mixed smarty, array Format:, Smarty )
Smarty {config_load} function plugin
Type: function
Name: config_load
Purpose: load config file vars
{config_load} (Smarty online manual)
array('file' => required config file name, 'section' => optional config file section to load 'scope' => local/parent/global 'global' => overrides scope, setting to parent if true)
public string|null smarty_function_counter(mixed params, mixed smarty, array parameters, Smarty )
Smarty {counter} function plugin
Type: function
Name: counter
Purpose: print out a counter value
{counter} (Smarty online manual)
public string|null smarty_function_cycle(mixed params, mixed smarty, Smarty )
Smarty {cycle} function plugin
Type: function
Name: cycle
Date: May 3, 2002
Purpose: cycle through given values
Input:
- name = name of cycle (optional)
- values = comma separated list of values to cycle,
or an array of values to cycle
(this can be left out for subsequent calls)
- reset = boolean - resets given var to true
- print = boolean - print var or not. default is true
- advance = boolean - whether or not to advance the cycle
- delimiter = the value delimiter, default is ","
- assign = boolean, assigns to template var instead of
printed.
Examples:
{cycle values="#eeeeee,#d0d0d0d"} {cycle name=row values="one,two,three" reset=true} {cycle name=row}
{cycle} (Smarty online manual)
public string smarty_function_debug(mixed params, mixed smarty, Smarty )
Smarty {debug} function plugin
Type: function
Name: debug
Date: July 1, 2002
Purpose: popup debug window
{debug} (Smarty online manual)
public string smarty_function_escape_special_chars(mixed string, string )
escape_special_chars common function
Function: smarty_function_escape_special_chars
Purpose: used by other smarty functions to escape
special chars except for already escaped ones
public void smarty_function_eval(mixed params, mixed smarty, Smarty )
Smarty {eval} function plugin
Type: function
Name: eval
Purpose: evaluate a template variable as a template
{eval} (Smarty online manual)
public string|null smarty_function_fetch(mixed params, mixed smarty, Smarty )
Smarty {fetch} plugin
Type: function
Name: fetch
Purpose: fetch file, web or ftp data and display results
{fetch} (Smarty online manual)
public string smarty_function_html_checkboxes(mixed params, mixed smarty, Smarty )
Smarty {html_checkboxes} function plugin
File: function.html_checkboxes.php
Type: function
Name: html_checkboxes
Date: 24.Feb.2003
Purpose: Prints out a list of checkbox input types
Input:
- name (optional) - string default "checkbox"
- values (required) - array
- options (optional) - associative array
- checked (optional) - array default not set
- separator (optional) - ie
or
- output (optional) - the output next to each checkbox
- assign (optional) - assign the output as an array to this variable
Examples:
{html_checkboxes values=$ids output=$names} {html_checkboxes values=$ids name='box' separator='
' output=$names} {html_checkboxes values=$ids checked=$checked separator='
' output=$names}
{html_checkboxes} (Smarty online manual)
public void smarty_function_html_checkboxes_output(mixed name, mixed value, mixed output, mixed selected, mixed extra, mixed separator, mixed labels)
public string smarty_function_html_image(mixed params, mixed smarty, Smarty )
Smarty {html_image} function plugin
Type: function
Name: html_image
Date: Feb 24, 2003
Purpose: format HTML tags for the image
Input:
- file = file (and path) of image (required)
- height = image height (optional, default actual height)
- width = image width (optional, default actual width)
- basedir = base directory for absolute paths, default
is environment variable DOCUMENT_ROOT
- path_prefix = prefix for path output (optional, default empty)
Examples: {html_image file="/images/masthead.gif"} Output:
{html_image} (Smarty online manual)
public string smarty_function_html_options(mixed params, mixed smarty, Smarty )
Smarty {html_options} function plugin
Type: function
Name: html_options
Input:
- name (optional) - string default "select"
- values (required if no options supplied) - array
- options (required if no values supplied) - associative array
- selected (optional) - string default not set
- output (required if not options supplied) - array
Purpose: Prints the list of
{html_image} (Smarty online manual)
public void smarty_function_html_options_optgroup(mixed key, mixed values, mixed selected)
public void smarty_function_html_options_optoutput(mixed key, mixed value, mixed selected)
public string smarty_function_html_radios(mixed params, mixed smarty, Smarty )
Smarty {html_radios} function plugin
File: function.html_radios.php
Type: function
Name: html_radios
Date: 24.Feb.2003
Purpose: Prints out a list of radio input types
Input:
- name (optional) - string default "radio"
- values (required) - array
- options (optional) - associative array
- checked (optional) - array default not set
- separator (optional) - ie
or
- output (optional) - the output next to each radio button
- assign (optional) - assign the output as an array to this variable
Examples:
{html_radios values=$ids output=$names} {html_radios values=$ids name='box' separator='
' output=$names} {html_radios values=$ids checked=$checked separator='
' output=$names}
{html_radios} (Smarty online manual)
public void smarty_function_html_radios_output(mixed name, mixed value, mixed output, mixed selected, mixed extra, mixed separator, mixed labels, mixed label_ids)
public string smarty_function_html_select_date(mixed params, mixed smarty, Smarty )
Smarty {html_select_date} plugin
Type: function
Name: html_select_date
Purpose: Prints the dropdowns for date selection.
ChangeLog:
- 1.0 initial release
- 1.1 added support for +/- N syntax for begin
and end year values. (Monte)
- 1.2 added support for yyyy-mm-dd syntax for
time value. (Jan Rosier)
- 1.3 added support for choosing format for
month values (Gary Loescher)
- 1.3.1 added support for choosing format for
day values (Marcus Bointon)
- 1.3.2 support negative timestamps, force year
dropdown to include given date unless explicitly set (Monte)
- 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
of 0000-00-00 dates (cybot, boots)
{html_select_date} (Smarty online manual)
public string smarty_function_html_select_time(mixed params, mixed smarty, Smarty )
Smarty {html_select_time} function plugin
Type: function
Name: html_select_time
Purpose: Prints the dropdowns for time selection
{html_select_time} (Smarty online manual)
public string smarty_function_html_table(mixed params, mixed smarty, Smarty )
Smarty {html_table} function plugin
Type: function
Name: html_table
Date: Feb 17, 2003
Purpose: make an html table from an array of data
Input:
- loop = array to loop through
- cols = number of columns, comma separated list of column names
or array of column names
- rows = number of rows
- table_attr = table attributes
- th_attr = table heading attributes (arrays are cycled)
- tr_attr = table row attributes (arrays are cycled)
- td_attr = table cell attributes (arrays are cycled)
- trailpad = value to pad trailing cells with
- caption = text for caption element
- vdir = vertical direction (default: "down", means top-to-bottom)
- hdir = horizontal direction (default: "right", means left-to-right)
- inner = inner loop (default "cols": print $loop line by line,
$loop will be printed column by column otherwise)
Examples:
{table loop=$data} {table loop=$data cols=4 tr_attr='"bgcolor=red"'} {table loop=$data cols="first,second,third" tr_attr=$colors}
{html_table} (Smarty online manual)
public void smarty_function_html_table_cycle(mixed name, mixed var, mixed no)
public string smarty_function_mailto(mixed params, mixed smarty, Smarty )
Smarty {mailto} function plugin
Type: function
Name: mailto
Date: May 21, 2002
Purpose: automate mailto address link creation, and optionally
encode them.
Input:
- address = e-mail address
- text = (optional) text to display, default is address
- encode = (optional) can be one of:
none : no encoding (default)
javascript : encode with javascript
javascript_charcode : encode with javascript charcode
hex : encode with hexidecimal (no javascript)
- cc = (optional) address(es) to carbon copy
- bcc = (optional) address(es) to blind carbon copy
- subject = (optional) e-mail subject
- newsgroups = (optional) newsgroup(s) to post to
- followupto = (optional) address(es) to follow up to
- extra = (optional) extra tags for the href link
Examples:
{mailto address="me@domain.com"} {mailto address="me@domain.com" encode="javascript"} {mailto address="me@domain.com" encode="hex"} {mailto address="me@domain.com" subject="Hello to you!"} {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"} {mailto address="me@domain.com" extra='class="mailto"'}
{mailto} (Smarty online manual)
public string smarty_function_math(mixed params, mixed smarty, Smarty )
Smarty {math} function plugin
Type: function
Name: math
Purpose: handle math computations in template
{math} (Smarty online manual)
public string smarty_function_popup(mixed params, mixed smarty, Smarty )
Smarty {popup} function plugin
Type: function
Name: popup
Purpose: make text pop up in windows via overlib
{popup} (Smarty online manual)
public string smarty_function_popup_init(mixed params, mixed smarty, Smarty )
Smarty {popup_init} function plugin
Type: function
Name: popup_init
Purpose: initialize overlib
{popup_init} (Smarty online manual)
public string smarty_make_timestamp(mixed string, string )
Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp
from a string.
public string smarty_modifier_capitalize(mixed string, mixed uc_digits, string )
Smarty capitalize modifier plugin
Type: modifier
Name: capitalize
Purpose: capitalize words in the string
capitalize (Smarty online manual)
public void smarty_modifier_capitalize_ucfirst(mixed string, mixed uc_digits)
public string smarty_modifier_cat(mixed string, mixed cat, string )
Smarty cat modifier plugin
Type: modifier
Name: cat
Date: Feb 24, 2003
Purpose: catenate a value to a variable
Input: string to catenate
Example: {$var|cat:"foo"}
cat (Smarty online manual)
public integer smarty_modifier_count_characters(mixed string, mixed include_spaces, string , boolean include)
Smarty count_characters modifier plugin
Type: modifier
Name: count_characteres
Purpose: count the number of characters in a text
count_characters (Smarty online manual)
public integer smarty_modifier_count_paragraphs(mixed string, string )
Smarty count_paragraphs modifier plugin
Type: modifier
Name: count_paragraphs
Purpose: count the number of paragraphs in a text
count_paragraphs (Smarty online manual)
public integer smarty_modifier_count_sentences(mixed string, string )
Smarty count_sentences modifier plugin
Type: modifier
Name: count_sentences
Purpose: count the number of sentences in a text
count_sentences (Smarty online manual)
public integer smarty_modifier_count_words(mixed string, string )
Smarty count_words modifier plugin
Type: modifier
Name: count_words
Purpose: count the number of words in a text
count_words (Smarty online manual)
public string|void smarty_modifier_date_format(mixed string, mixed format, mixed default_date, string )
Smarty date_format modifier plugin
Type: modifier
Name: date_format
Purpose: format datestamps via strftime
Input:
- string: input date string
- format: strftime format for output
- default_date: default date if $string is empty
date_format (Smarty online manual)
public string smarty_modifier_debug_print_var(mixed var, mixed depth, mixed length, integer )
Smarty debug_print_var modifier plugin
Type: modifier
Name: debug_print_var
Purpose: formats variable contents for display in the console
debug_print_var (Smarty online manual)
public string smarty_modifier_default(mixed string, mixed default, string )
Smarty default modifier plugin
Type: modifier
Name: default
Purpose: designate default value for empty variables
default (Smarty online manual)
public string smarty_modifier_escape(mixed string, mixed esc_type, mixed char_set, html|htmlall|url|quotes|hex|hexentity|javascript )
Smarty escape modifier plugin
Type: modifier
Name: escape
Purpose: Escape the string according to escapement type
escape (Smarty online manual)
public string smarty_modifier_indent(mixed string, mixed chars, mixed char, string )
Smarty indent modifier plugin
Type: modifier
Name: indent
Purpose: indent lines of text
indent (Smarty online manual)
public string smarty_modifier_lower(mixed string, string )
Smarty lower modifier plugin
Type: modifier
Name: lower
Purpose: convert string to lowercase
lower (Smarty online manual)
public string smarty_modifier_nl2br(mixed string, string )
Smarty plugin
Type: modifier
Name: nl2br
Date: Feb 26, 2003
Purpose: convert \r\n, \r or \n to <
>
Input:
- contents = contents to replace
- preceed_test = if true, includes preceeding break tags
in replacement
Example: {$text|nl2br}
nl2br (Smarty online manual)
public string smarty_modifier_regex_replace(mixed string, mixed search, mixed replace, string|array )
Smarty regex_replace modifier plugin
Type: modifier
Name: regex_replace
Purpose: regular expression search/replace
regex_replace (Smarty online manual)
public string smarty_modifier_replace(mixed string, mixed search, mixed replace, string )
Smarty replace modifier plugin
Type: modifier
Name: replace
Purpose: simple search/replace
replace (Smarty online manual)
public string smarty_modifier_spacify(mixed string, mixed spacify_char, string )
Smarty spacify modifier plugin
Type: modifier
Name: spacify
Purpose: add spaces between characters in a string
spacify (Smarty online manual)
public string smarty_modifier_string_format(mixed string, mixed format, string )
Smarty string_format modifier plugin
Type: modifier
Name: string_format
Purpose: format strings via sprintf
string_format (Smarty online manual)
public string smarty_modifier_strip(mixed text, mixed replace, string )
Smarty strip modifier plugin
Type: modifier
Name: strip
Purpose: Replace all repeated spaces, newlines, tabs
with a single space or supplied replacement string.
Example: {$var|strip} {$var|strip:" "}
Date: September 25th, 2002
strip (Smarty online manual)
public string smarty_modifier_strip_tags(mixed string, mixed replace_with_space, boolean )
Smarty strip_tags modifier plugin
Type: modifier
Name: strip_tags
Purpose: strip html tags from text
strip_tags (Smarty online manual)
public string smarty_modifier_truncate(mixed string, mixed length, mixed etc, mixed break_words, mixed middle, boolean )
Smarty truncate modifier plugin
Type: modifier
Name: truncate
Purpose: Truncate a string to a certain length if necessary,
optionally splitting in the middle of a word, and
appending the $etc string or inserting $etc into the middle.
truncate (Smarty online manual)
public string smarty_modifier_upper(mixed string, string )
Smarty upper modifier plugin
Type: modifier
Name: upper
Purpose: convert string to uppercase
upper (Smarty online manual)
public string smarty_modifier_wordwrap(mixed string, mixed length, mixed break, mixed cut, boolean )
Smarty wordwrap modifier plugin
Type: modifier
Name: wordwrap
Purpose: wrap a string of text at a given length
wordwrap (Smarty online manual)
public void smarty_outputfilter_trimwhitespace(mixed source, mixed smarty, Smarty )
Smarty trimwhitespace outputfilter plugin
File: outputfilter.trimwhitespace.php
Type: outputfilter
Name: trimwhitespace
Date: Jan 25, 2003
Purpose: trim leading white space and blank lines from
template source after it gets interpreted, cleaning
up code and saving bandwidth. Does not affect
<
>and blocks.
$smarty->load_filter('output','trimwhitespace');
from application.
public void smarty_outputfilter_trimwhitespace_replace(mixed search_str, mixed replace, mixed subject)