Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Functions

  • smarty_function_counter
  • smarty_function_cycle
  • smarty_function_fetch
  • smarty_function_html_checkboxes
  • smarty_function_html_checkboxes_output
  • smarty_function_html_image
  • smarty_function_html_options
  • smarty_function_html_options_optgroup
  • smarty_function_html_options_optoutput
  • smarty_function_html_radios
  • smarty_function_html_radios_output
  • smarty_function_html_select_date
  • smarty_function_html_select_time
  • smarty_function_html_table
  • smarty_function_html_table_cycle
  • smarty_function_mailto
  • smarty_function_math
  • Overview
  • Package
  • Function
  • Todo
  • Download

Package Smarty\PluginsFunction

Functions summary
smarty_function_counter

Smarty {counter} function plugin Type: function
Name: counter
Purpose: print out a counter value

smarty_function_cycle

Smarty {cycle} function plugin Type: function
Name: cycle
Date: May 3, 2002
Purpose: cycle through given values
Params:

- 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}
smarty_function_fetch

Smarty {fetch} plugin Type: function
Name: fetch
Purpose: fetch file, web or ftp data and display results

smarty_function_html_checkboxes

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
Examples:

{html_checkboxes values=$ids output=$names}
{html_checkboxes values=$ids name='box' separator='<br>' output=$names}
{html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}

Params:

- name       (optional) - string default "checkbox"
- values     (required) - array
- options    (optional) - associative array
- checked    (optional) - array default not set
- separator  (optional) - ie <br> or &nbsp;
- output     (optional) - the output next to each checkbox
- assign     (optional) - assign the output as an array to this variable
- escape     (optional) - escape the content (not value), defaults to true
smarty_function_html_checkboxes_output
smarty_function_html_image

Smarty {html_image} function plugin Type: function
Name: html_image
Date: Feb 24, 2003
Purpose: format HTML tags for the image
Examples: {html_image file="/images/masthead.gif"}
Output:
Params:

- file        - (required) - file (and path) of image
- height      - (optional) - image height (default actual height)
- width       - (optional) - image width (default actual width)
- basedir     - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT
- path_prefix - prefix for path output (optional, default empty)
smarty_function_html_options

Smarty {html_options} function plugin Type: function
Name: html_options
Purpose: Prints the list of

- 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
- id         (optional) - string default not set
- class      (optional) - string default not set
smarty_function_html_options_optgroup
smarty_function_html_options_optoutput
smarty_function_html_radios

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
Params:

- name       (optional) - string default "radio"
- values     (required) - array
- options    (required) - associative array
- checked    (optional) - array default not set
- separator  (optional) - ie <br> or &nbsp;
- output     (optional) - the output next to each radio button
- assign     (optional) - assign the output as an array to this variable
- escape     (optional) - escape the content (not value), defaults to true

Examples:

{html_radios values=$ids output=$names}
{html_radios values=$ids name='box' separator='<br>' output=$names}
{html_radios values=$ids checked=$checked separator='<br>' output=$names}
smarty_function_html_radios_output
smarty_function_html_select_date

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)
           - 2.0 complete rewrite for performance,
             added attributes month_names, *_id
smarty_function_html_select_time

Smarty {html_select_time} function plugin Type: function
Name: html_select_time
Purpose: Prints the dropdowns for time selection

smarty_function_html_table

Smarty {html_table} function plugin Type: function
Name: html_table
Date: Feb 17, 2003
Purpose: make an html table from an array of data
Params:

- 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}
smarty_function_html_table_cycle
smarty_function_mailto

Smarty {mailto} function plugin Type: function
Name: mailto
Date: May 21, 2002 Purpose: automate mailto address link creation, and optionally encode them.
Params:

- address    - (required) - 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"'}
smarty_function_math

Smarty {math} function plugin Type: function
Name: math
Purpose: handle math computations in template

CMS CONTENIDO 4.9.7 API documentation generated by ApiGen