Smarty {textformat}{/textformat} block plugin
Type: block function
Name: textformat
Purpose: format text a certain way with preset styles
or custom wrap/indent settings
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.
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
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:
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
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:
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:
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:
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"}
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
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
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.
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.