mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
updated all doc comments to phpDocumentor format
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2003-04-20 Greg Beaver <cellog@users.sourceforge.net>
|
||||||
|
* plugins/*
|
||||||
|
Smarty.class.php
|
||||||
|
Smarty_Compiler.class.php
|
||||||
|
Config_File.class.php:
|
||||||
|
updated all doc comments to phpDocumentor format (whew!)
|
||||||
|
|
||||||
2003-04-06 Messju Mohr <messju@lammfellpuschen.de>
|
2003-04-06 Messju Mohr <messju@lammfellpuschen.de>
|
||||||
|
|
||||||
* libs/plugins/function.math.php:
|
* libs/plugins/function.math.php:
|
||||||
|
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
|||||||
|
- all in-code doc comments converted to phpDocumentor format (Greg)
|
||||||
- moved strip from smarty core to plugin (Monte)
|
- moved strip from smarty core to plugin (Monte)
|
||||||
- moved config_load from smarty core to plugin (Monte)
|
- moved config_load from smarty core to plugin (Monte)
|
||||||
- added &$repeat-paramter to block-functions (messju)
|
- added &$repeat-paramter to block-functions (messju)
|
||||||
|
@@ -34,10 +34,14 @@
|
|||||||
* @copyright Copyright: 2001,2002 ispi of Lincoln, Inc.
|
* @copyright Copyright: 2001,2002 ispi of Lincoln, Inc.
|
||||||
* @author Andrei Zmievski <andrei@php.net>
|
* @author Andrei Zmievski <andrei@php.net>
|
||||||
* @access public
|
* @access public
|
||||||
|
* @package Smarty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
/**
|
||||||
|
* Config file reading class
|
||||||
|
* @package Smarty
|
||||||
|
*/
|
||||||
class Config_File {
|
class Config_File {
|
||||||
/**#@+
|
/**#@+
|
||||||
* Options
|
* Options
|
||||||
|
@@ -909,6 +909,7 @@ class Smarty
|
|||||||
* @param string $cache_id name of cache_id
|
* @param string $cache_id name of cache_id
|
||||||
* @param string $compile_id name of compile_id
|
* @param string $compile_id name of compile_id
|
||||||
* @param string $exp_time expiration time
|
* @param string $exp_time expiration time
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
|
function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
|
||||||
{
|
{
|
||||||
@@ -935,6 +936,7 @@ class Smarty
|
|||||||
* clear the entire contents of cache (all templates)
|
* clear the entire contents of cache (all templates)
|
||||||
*
|
*
|
||||||
* @param string $exp_time expire time
|
* @param string $exp_time expire time
|
||||||
|
* @return boolean results of {@link _rm_auto()}
|
||||||
*/
|
*/
|
||||||
function clear_all_cache($exp_time = null)
|
function clear_all_cache($exp_time = null)
|
||||||
{
|
{
|
||||||
@@ -953,6 +955,7 @@ class Smarty
|
|||||||
* @param string $tpl_file name of template file
|
* @param string $tpl_file name of template file
|
||||||
* @param string $cache_id
|
* @param string $cache_id
|
||||||
* @param string $compile_id
|
* @param string $compile_id
|
||||||
|
* @return string|false results of {@link _read_cache_file()}
|
||||||
*/
|
*/
|
||||||
function is_cached($tpl_file, $cache_id = null, $compile_id = null)
|
function is_cached($tpl_file, $cache_id = null, $compile_id = null)
|
||||||
{
|
{
|
||||||
@@ -983,6 +986,7 @@ class Smarty
|
|||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
* @param string $compile_id
|
* @param string $compile_id
|
||||||
* @param string $exp_time
|
* @param string $exp_time
|
||||||
|
* @return boolean results of {@link _rm_auto()}
|
||||||
*/
|
*/
|
||||||
function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
|
function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
|
||||||
{
|
{
|
||||||
@@ -995,6 +999,7 @@ class Smarty
|
|||||||
* Checks whether requested template exists.
|
* Checks whether requested template exists.
|
||||||
*
|
*
|
||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function template_exists($tpl_file)
|
function template_exists($tpl_file)
|
||||||
{
|
{
|
||||||
@@ -1006,7 +1011,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @return mixed
|
* @return array
|
||||||
*/
|
*/
|
||||||
function &get_template_vars($name=null)
|
function &get_template_vars($name=null)
|
||||||
{
|
{
|
||||||
@@ -1023,7 +1028,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @return mixed
|
* @return array
|
||||||
*/
|
*/
|
||||||
function &get_config_vars($name=null)
|
function &get_config_vars($name=null)
|
||||||
{
|
{
|
||||||
@@ -1290,6 +1295,7 @@ class Smarty
|
|||||||
* return a reference to a registered object
|
* return a reference to a registered object
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
* @return object
|
||||||
*/
|
*/
|
||||||
function &get_registered_object($name) {
|
function &get_registered_object($name) {
|
||||||
if (!isset($this->_reg_objects[$name]))
|
if (!isset($this->_reg_objects[$name]))
|
||||||
@@ -1309,6 +1315,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $resource_type
|
* @param string $resource_type
|
||||||
* @param string $resource_name
|
* @param string $resource_name
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _is_trusted($resource_type, $resource_name)
|
function _is_trusted($resource_type, $resource_name)
|
||||||
{
|
{
|
||||||
@@ -1344,6 +1351,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $resource_type
|
* @param string $resource_type
|
||||||
* @param string $resource_name
|
* @param string $resource_name
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _is_secure($resource_type, $resource_name)
|
function _is_secure($resource_type, $resource_name)
|
||||||
{
|
{
|
||||||
@@ -1380,6 +1388,7 @@ class Smarty
|
|||||||
* @param string $resource
|
* @param string $resource
|
||||||
* @param string $resource_type
|
* @param string $resource_type
|
||||||
* @param $php_resource
|
* @param $php_resource
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _get_php_resource($resource, &$resource_type, &$php_resource)
|
function _get_php_resource($resource, &$resource_type, &$php_resource)
|
||||||
{
|
{
|
||||||
@@ -1442,6 +1451,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
* @param string $compile_path
|
* @param string $compile_path
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _process_template($tpl_file, $compile_path)
|
function _process_template($tpl_file, $compile_path)
|
||||||
{
|
{
|
||||||
@@ -1482,6 +1492,7 @@ class Smarty
|
|||||||
* Get the compile path for this template file
|
* Get the compile path for this template file
|
||||||
*
|
*
|
||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
|
* @return string results of {@link _get_auto_filename()}
|
||||||
*/
|
*/
|
||||||
function _get_compile_path($tpl_file)
|
function _get_compile_path($tpl_file)
|
||||||
{
|
{
|
||||||
@@ -1512,6 +1523,7 @@ class Smarty
|
|||||||
* @param string $file_path
|
* @param string $file_path
|
||||||
* @param string $resource_type
|
* @param string $resource_type
|
||||||
* @param string $resource_name
|
* @param string $resource_name
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name)
|
function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name)
|
||||||
{
|
{
|
||||||
@@ -1566,6 +1578,7 @@ class Smarty
|
|||||||
* @param integer $template_timestamp
|
* @param integer $template_timestamp
|
||||||
* @param boolean $get_source
|
* @param boolean $get_source
|
||||||
* @param boolean $quiet
|
* @param boolean $quiet
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false)
|
function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false)
|
||||||
{
|
{
|
||||||
@@ -1630,6 +1643,7 @@ class Smarty
|
|||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
* @param string $template_source
|
* @param string $template_source
|
||||||
* @param string $template_compiled
|
* @param string $template_compiled
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _compile_template($tpl_file, $template_source, &$template_compiled)
|
function _compile_template($tpl_file, $template_source, &$template_compiled)
|
||||||
{
|
{
|
||||||
@@ -1778,6 +1792,7 @@ class Smarty
|
|||||||
* Replace cached inserts with the actual results
|
* Replace cached inserts with the actual results
|
||||||
*
|
*
|
||||||
* @param string $results
|
* @param string $results
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _process_cached_inserts($results)
|
function _process_cached_inserts($results)
|
||||||
{
|
{
|
||||||
@@ -1825,6 +1840,7 @@ class Smarty
|
|||||||
* Handle insert tags
|
* Handle insert tags
|
||||||
*
|
*
|
||||||
* @param array $args
|
* @param array $args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _run_insert_handler($args)
|
function _run_insert_handler($args)
|
||||||
{
|
{
|
||||||
@@ -1878,6 +1894,9 @@ class Smarty
|
|||||||
/**
|
/**
|
||||||
* Handle modifiers
|
* Handle modifiers
|
||||||
*
|
*
|
||||||
|
* @param string|null $modifier_name
|
||||||
|
* @param array|null $map_array
|
||||||
|
* @return string result of modifiers
|
||||||
*/
|
*/
|
||||||
function _run_mod_handler()
|
function _run_mod_handler()
|
||||||
{
|
{
|
||||||
@@ -1903,6 +1922,7 @@ class Smarty
|
|||||||
* Remove starting and ending quotes from the string
|
* Remove starting and ending quotes from the string
|
||||||
*
|
*
|
||||||
* @param string $string
|
* @param string $string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _dequote($string)
|
function _dequote($string)
|
||||||
{
|
{
|
||||||
@@ -1921,6 +1941,7 @@ class Smarty
|
|||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @param integer $start
|
* @param integer $start
|
||||||
* @param integer $lines
|
* @param integer $lines
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _read_file($filename, $start=null, $lines=null)
|
function _read_file($filename, $start=null, $lines=null)
|
||||||
{
|
{
|
||||||
@@ -1963,6 +1984,7 @@ class Smarty
|
|||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @param string $contents
|
* @param string $contents
|
||||||
* @param boolean $create_dirs
|
* @param boolean $create_dirs
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _write_file($filename, $contents, $create_dirs = false)
|
function _write_file($filename, $contents, $create_dirs = false)
|
||||||
{
|
{
|
||||||
@@ -1999,6 +2021,9 @@ class Smarty
|
|||||||
* @param string $auto_base
|
* @param string $auto_base
|
||||||
* @param string $auto_source
|
* @param string $auto_source
|
||||||
* @param string $auto_id
|
* @param string $auto_id
|
||||||
|
* @return string
|
||||||
|
* @staticvar string|null
|
||||||
|
* @staticvar string|null
|
||||||
*/
|
*/
|
||||||
function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
|
function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
|
||||||
{
|
{
|
||||||
@@ -2054,6 +2079,7 @@ class Smarty
|
|||||||
* @param string $auto_source
|
* @param string $auto_source
|
||||||
* @param string $auto_id
|
* @param string $auto_id
|
||||||
* @param integer $exp_time
|
* @param integer $exp_time
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
|
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
|
||||||
{
|
{
|
||||||
@@ -2093,6 +2119,7 @@ class Smarty
|
|||||||
* @param string $dirname
|
* @param string $dirname
|
||||||
* @param integer $level
|
* @param integer $level
|
||||||
* @param integer $exp_time
|
* @param integer $exp_time
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _rmdir($dirname, $level = 1, $exp_time = null)
|
function _rmdir($dirname, $level = 1, $exp_time = null)
|
||||||
{
|
{
|
||||||
@@ -2192,6 +2219,7 @@ class Smarty
|
|||||||
* @param string $cache_id
|
* @param string $cache_id
|
||||||
* @param string $compile_id
|
* @param string $compile_id
|
||||||
* @param string $results
|
* @param string $results
|
||||||
|
* @return true|null
|
||||||
*/
|
*/
|
||||||
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
||||||
{
|
{
|
||||||
@@ -2229,6 +2257,7 @@ class Smarty
|
|||||||
* @param string $cache_id
|
* @param string $cache_id
|
||||||
* @param string $compile_id
|
* @param string $compile_id
|
||||||
* @param string $results
|
* @param string $results
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results)
|
function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results)
|
||||||
{
|
{
|
||||||
@@ -2309,6 +2338,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $cache_id
|
* @param string $cache_id
|
||||||
* @param string $compile_id
|
* @param string $compile_id
|
||||||
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
function _get_auto_id($cache_id=null, $compile_id=null) {
|
function _get_auto_id($cache_id=null, $compile_id=null) {
|
||||||
if (isset($cache_id))
|
if (isset($cache_id))
|
||||||
@@ -2324,6 +2354,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
* @return string|false
|
||||||
*/
|
*/
|
||||||
function _get_plugin_filepath($type, $name)
|
function _get_plugin_filepath($type, $name)
|
||||||
{
|
{
|
||||||
@@ -2537,6 +2568,7 @@ class Smarty
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* automatically load a set of filters
|
* automatically load a set of filters
|
||||||
|
* @uses load_filter()
|
||||||
*/
|
*/
|
||||||
function _autoload_filters()
|
function _autoload_filters()
|
||||||
{
|
{
|
||||||
@@ -2551,6 +2583,7 @@ class Smarty
|
|||||||
* Quote subpattern references
|
* Quote subpattern references
|
||||||
*
|
*
|
||||||
* @param string $string
|
* @param string $string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function quote_replace($string)
|
function quote_replace($string)
|
||||||
{
|
{
|
||||||
@@ -2601,6 +2634,8 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @param string $file_path
|
* @param string $file_path
|
||||||
* @param string $new_file_path
|
* @param string $new_file_path
|
||||||
|
* @return boolean
|
||||||
|
* @staticvar array|null
|
||||||
*/
|
*/
|
||||||
function _get_include_path($file_path, &$new_file_path)
|
function _get_include_path($file_path, &$new_file_path)
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
/**
|
||||||
|
* Template compiling class
|
||||||
|
* @package Smarty
|
||||||
|
*/
|
||||||
class Smarty_Compiler extends Smarty {
|
class Smarty_Compiler extends Smarty {
|
||||||
|
|
||||||
// internal vars
|
// internal vars
|
||||||
@@ -206,6 +209,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @param string $tpl_file
|
* @param string $tpl_file
|
||||||
* @param string $template_source
|
* @param string $template_source
|
||||||
* @param string $template_compiled
|
* @param string $template_compiled
|
||||||
|
* @return true
|
||||||
*/
|
*/
|
||||||
function _compile_file($tpl_file, $template_source, &$template_compiled)
|
function _compile_file($tpl_file, $template_source, &$template_compiled)
|
||||||
{
|
{
|
||||||
@@ -358,6 +362,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compile a template tag
|
* Compile a template tag
|
||||||
*
|
*
|
||||||
* @param string $template_tag
|
* @param string $template_tag
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_tag($template_tag)
|
function _compile_tag($template_tag)
|
||||||
{
|
{
|
||||||
@@ -490,6 +495,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @param string $tag_command
|
* @param string $tag_command
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
* @param string $output
|
* @param string $output
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _compile_compiler_tag($tag_command, $tag_args, &$output)
|
function _compile_compiler_tag($tag_command, $tag_args, &$output)
|
||||||
{
|
{
|
||||||
@@ -554,6 +560,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
* @param string $tag_modifier
|
* @param string $tag_modifier
|
||||||
* @param string $output
|
* @param string $output
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
|
function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
|
||||||
{
|
{
|
||||||
@@ -642,6 +649,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @param string $tag_command
|
* @param string $tag_command
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
* @param string $tag_modifier
|
* @param string $tag_modifier
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_custom_tag($tag_command, $tag_args, $tag_modifier)
|
function _compile_custom_tag($tag_command, $tag_args, $tag_modifier)
|
||||||
{
|
{
|
||||||
@@ -673,6 +681,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @param string $tag_command
|
* @param string $tag_command
|
||||||
* @param array $attrs
|
* @param array $attrs
|
||||||
* @param string $tag_modifier
|
* @param string $tag_modifier
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
|
function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
|
||||||
{
|
{
|
||||||
@@ -728,6 +737,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compile {insert ...} tag
|
* Compile {insert ...} tag
|
||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_insert_tag($tag_args)
|
function _compile_insert_tag($tag_args)
|
||||||
{
|
{
|
||||||
@@ -758,7 +768,8 @@ class Smarty_Compiler extends Smarty {
|
|||||||
/**
|
/**
|
||||||
* Compile {include ...} tag
|
* Compile {include ...} tag
|
||||||
*
|
*
|
||||||
* $param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_include_tag($tag_args)
|
function _compile_include_tag($tag_args)
|
||||||
{
|
{
|
||||||
@@ -808,6 +819,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compile {include ...} tag
|
* Compile {include ...} tag
|
||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_include_php_tag($tag_args)
|
function _compile_include_php_tag($tag_args)
|
||||||
{
|
{
|
||||||
@@ -840,6 +852,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compile {section ...} tag
|
* Compile {section ...} tag
|
||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_section_start($tag_args)
|
function _compile_section_start($tag_args)
|
||||||
{
|
{
|
||||||
@@ -944,6 +957,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compile {foreach ...} tag.
|
* Compile {foreach ...} tag.
|
||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_foreach_start($tag_args)
|
function _compile_foreach_start($tag_args)
|
||||||
{
|
{
|
||||||
@@ -1008,6 +1022,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param boolean $start true if this is the {capture} tag
|
* @param boolean $start true if this is the {capture} tag
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_capture_tag($start, $tag_args = '')
|
function _compile_capture_tag($start, $tag_args = '')
|
||||||
{
|
{
|
||||||
@@ -1034,6 +1049,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
* @param boolean $elseif if true, uses elseif instead of if
|
* @param boolean $elseif if true, uses elseif instead of if
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_if_tag($tag_args, $elseif = false)
|
function _compile_if_tag($tag_args, $elseif = false)
|
||||||
{
|
{
|
||||||
@@ -1195,6 +1211,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param string $is_arg
|
* @param string $is_arg
|
||||||
* @param array $tokens
|
* @param array $tokens
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
function _parse_is_expr($is_arg, $tokens)
|
function _parse_is_expr($is_arg, $tokens)
|
||||||
{
|
{
|
||||||
@@ -1256,6 +1273,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param string $tag_args
|
* @param string $tag_args
|
||||||
* @param true $quote unused?
|
* @param true $quote unused?
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
function _parse_attrs($tag_args, $quote = true)
|
function _parse_attrs($tag_args, $quote = true)
|
||||||
{
|
{
|
||||||
@@ -1354,6 +1372,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param string $val
|
* @param string $val
|
||||||
* @param string $tag_attrs
|
* @param string $tag_attrs
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _parse_var_props($val, $tag_attrs = null)
|
function _parse_var_props($val, $tag_attrs = null)
|
||||||
{
|
{
|
||||||
@@ -1400,6 +1419,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* expand quoted text with embedded variables
|
* expand quoted text with embedded variables
|
||||||
*
|
*
|
||||||
* @param string $var_expr
|
* @param string $var_expr
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _expand_quoted_text($var_expr)
|
function _expand_quoted_text($var_expr)
|
||||||
{
|
{
|
||||||
@@ -1424,6 +1444,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* parse variable expression into PHP code
|
* parse variable expression into PHP code
|
||||||
*
|
*
|
||||||
* @param string $var_expr
|
* @param string $var_expr
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _parse_var($var_expr)
|
function _parse_var($var_expr)
|
||||||
{
|
{
|
||||||
@@ -1502,6 +1523,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* parse arguments in function call parenthesis
|
* parse arguments in function call parenthesis
|
||||||
*
|
*
|
||||||
* @param string $parenth_args
|
* @param string $parenth_args
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _parse_parenth_args($parenth_args)
|
function _parse_parenth_args($parenth_args)
|
||||||
{
|
{
|
||||||
@@ -1518,6 +1540,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* parse configuration variable expression into PHP code
|
* parse configuration variable expression into PHP code
|
||||||
*
|
*
|
||||||
* @param string $conf_var_expr
|
* @param string $conf_var_expr
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _parse_conf_var($conf_var_expr)
|
function _parse_conf_var($conf_var_expr)
|
||||||
{
|
{
|
||||||
@@ -1539,6 +1562,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* parse section property expression into PHP code
|
* parse section property expression into PHP code
|
||||||
*
|
*
|
||||||
* @param string $section_prop_expr
|
* @param string $section_prop_expr
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _parse_section_prop($section_prop_expr)
|
function _parse_section_prop($section_prop_expr)
|
||||||
{
|
{
|
||||||
@@ -1634,6 +1658,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* Compiles references of type $smarty.foo
|
* Compiles references of type $smarty.foo
|
||||||
*
|
*
|
||||||
* @param string $indexes
|
* @param string $indexes
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_smarty_ref(&$indexes)
|
function _compile_smarty_ref(&$indexes)
|
||||||
{
|
{
|
||||||
@@ -1740,6 +1765,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _compile_plugin_call($type, $name) {
|
function _compile_plugin_call($type, $name) {
|
||||||
if (isset($this->_plugins[$type][$name])) {
|
if (isset($this->_plugins[$type][$name])) {
|
||||||
@@ -1810,6 +1836,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string $a
|
* @param string $a
|
||||||
* @param string $b
|
* @param string $b
|
||||||
|
* @return 0|-1|1
|
||||||
*/
|
*/
|
||||||
function _smarty_sort_length($a, $b)
|
function _smarty_sort_length($a, $b)
|
||||||
{
|
{
|
||||||
|
@@ -6,12 +6,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty textformat plugin
|
* Smarty {strip}{/strip} block plugin
|
||||||
*
|
*
|
||||||
* Type: block function<br>
|
* Type: block function<br>
|
||||||
* Name: strip<br>
|
* Name: strip<br>
|
||||||
* Purpose: strip unwanted white space from text<br>
|
* Purpose: strip unwanted white space from text<br>
|
||||||
*
|
* @link http://smarty.php.net/manual/en/language.function.strip.php {strip}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array unused, no parameters for this block
|
||||||
|
* @param string content of {strip}{/strip} tags
|
||||||
|
* @param Smarty clever method emulation
|
||||||
|
* @return string $content stripped of whitespace
|
||||||
*/
|
*/
|
||||||
function smarty_block_strip($params, $content, &$this)
|
function smarty_block_strip($params, $content, &$this)
|
||||||
{
|
{
|
||||||
|
@@ -6,12 +6,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty textformat plugin
|
* Smarty {textformat}{/textformat} block plugin
|
||||||
*
|
*
|
||||||
* Type: block function<br>
|
* Type: block function<br>
|
||||||
* Name: textformat<br>
|
* Name: textformat<br>
|
||||||
* Purpose: format text a certain way with preset styles
|
* Purpose: format text a certain way with preset styles
|
||||||
* or custom wrap/indent settings<br>
|
* or custom wrap/indent settings<br>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
|
||||||
|
* (Smarty online manual)
|
||||||
* @param array
|
* @param array
|
||||||
* <pre>
|
* <pre>
|
||||||
* Params: style: string (email)
|
* Params: style: string (email)
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
* </pre>
|
* </pre>
|
||||||
* @param string contents of the block
|
* @param string contents of the block
|
||||||
* @param Smarty clever simulation of a method
|
* @param Smarty clever simulation of a method
|
||||||
|
* @return string string $content re-formatted
|
||||||
*/
|
*/
|
||||||
function smarty_block_textformat($params, $content, &$this)
|
function smarty_block_textformat($params, $content, &$this)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Smarty plugin
|
||||||
|
* @package Smarty
|
||||||
|
* @subpackage plugins
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Smarty plugin
|
* Smarty {assign} function plugin
|
||||||
* -------------------------------------------------------------
|
*
|
||||||
* Type: function
|
* Type: function<br>
|
||||||
* Name: assign
|
* Name: assign<br>
|
||||||
* Purpose: assign a value to a template variable
|
* Purpose: assign a value to a template variable
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array Format: array('var' => variable name, 'value' => value to assign)
|
||||||
|
* @param Smarty
|
||||||
*/
|
*/
|
||||||
function smarty_function_assign($params, &$smarty)
|
function smarty_function_assign($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,15 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: debug
|
*/
|
||||||
* Version: 1.0
|
|
||||||
* Date: July 1, 2002
|
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
/**
|
||||||
|
* Smarty {debug} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: debug<br>
|
||||||
|
* Date: July 1, 2002<br>
|
||||||
* Purpose: popup debug window
|
* Purpose: popup debug window
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string output from {@link Smarty::_generate_debug_output()}
|
||||||
*/
|
*/
|
||||||
function smarty_function_debug($params, &$smarty)
|
function smarty_function_debug($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: eval
|
*/
|
||||||
* Purpose: evaluate a template variable as a template
|
|
||||||
* -------------------------------------------------------------
|
|
||||||
|
/**
|
||||||
|
* Smarty {eval} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: eval<br>
|
||||||
|
* Purpose: evaluate a template variable as a template<br>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.eval.php {eval}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
*/
|
*/
|
||||||
function smarty_function_eval($params, &$this)
|
function smarty_function_eval($params, &$this)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: fetch
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty {fetch} plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: fetch<br>
|
||||||
* Purpose: fetch file, web or ftp data and display results
|
* Purpose: fetch file, web or ftp data and display results
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string|null if the assign parameter is passed, Smarty assigns the
|
||||||
|
* result to a template variable
|
||||||
*/
|
*/
|
||||||
function smarty_function_fetch($params, &$smarty)
|
function smarty_function_fetch($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,26 +1,41 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* File: function.html_checkboxes.php
|
* @subpackage plugins
|
||||||
* Type: function
|
*/
|
||||||
* Name: html_checkboxes
|
|
||||||
* Version: 1.0
|
|
||||||
* Date: 24.Feb.2003
|
/**
|
||||||
* Purpose: Prints out a list of checkbox input types
|
* Smarty {html_checkboxes} function plugin
|
||||||
* Input: name (optional) - string default "checkbox"
|
*
|
||||||
* values (required) - array
|
* File: function.html_checkboxes.php<br>
|
||||||
* options (optional) - associative array
|
* Type: function<br>
|
||||||
* checked (optional) - array default not set
|
* Name: html_checkboxes<br>
|
||||||
* separator (optional) - ie <br> or
|
* Date: 24.Feb.2003<br>
|
||||||
* output (optional) - without this one the buttons don't have names
|
* Purpose: Prints out a list of checkbox input types<br>
|
||||||
* Author: Christopher Kvarme <christopher.kvarme@flashjab.com>
|
* Input:<br>
|
||||||
* Credits: Monte Ohrt <monte@ispi.net>
|
* - name (optional) - string default "checkbox"
|
||||||
* Examples: {html_checkboxes values=$ids output=$names}
|
* - values (required) - array
|
||||||
* {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
|
* - options (optional) - associative array
|
||||||
* {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
|
* - checked (optional) - array default not set
|
||||||
* -------------------------------------------------------------
|
* - separator (optional) - ie <br> or
|
||||||
|
* - output (optional) - without this one the buttons don't have names
|
||||||
|
* Examples:
|
||||||
|
* <pre>
|
||||||
|
* {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}
|
||||||
|
* </pre>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @author Christopher Kvarme <christopher.kvarme@flashjab.com>
|
||||||
|
* @author credits to Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
|
* @uses smarty_function_escape_special_chars()
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_checkboxes($params, &$smarty)
|
function smarty_function_html_checkboxes($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,26 +1,38 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: html_image
|
*/
|
||||||
* Version: 1.0
|
|
||||||
* Date: Feb 24, 2003
|
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
/**
|
||||||
* Credits: Duda <duda@big.hu> - wrote first image function
|
* Smarty {html_image} function plugin
|
||||||
* in repository, helped with lots of functionality
|
*
|
||||||
* Purpose: format HTML tags for the image
|
* Type: function<br>
|
||||||
* Input: file = file (and path) of image (required)
|
* Name: html_image<br>
|
||||||
* border = border width (optional, default 0)
|
* Date: Feb 24, 2003<br>
|
||||||
* height = image height (optional, default actual height)
|
* Purpose: format HTML tags for the image<br>
|
||||||
* image =image width (optional, default actual width)
|
* Input:<br>
|
||||||
* basedir = base directory for absolute paths, default
|
* - file = file (and path) of image (required)
|
||||||
|
* - border = border width (optional, default 0)
|
||||||
|
* - height = image height (optional, default actual height)
|
||||||
|
* - image =image width (optional, default actual width)
|
||||||
|
* - basedir = base directory for absolute paths, default
|
||||||
* is environment variable DOCUMENT_ROOT
|
* is environment variable DOCUMENT_ROOT
|
||||||
*
|
*
|
||||||
* Examples: {image file="images/masthead.gif"}
|
* Examples: {image file="images/masthead.gif"}
|
||||||
* Output: <img src="images/masthead.gif" border=0 width=400 height=23>
|
* Output: <img src="images/masthead.gif" border=0 width=400 height=23>
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @author credits to Duda <duda@big.hu> - wrote first image function
|
||||||
|
* in repository, helped with lots of functionality
|
||||||
|
* @version 1.0
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
|
* @uses smarty_function_escape_special_chars()
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_image($params, &$smarty)
|
function smarty_function_html_image($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,18 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Smarty plugin
|
||||||
|
* @package Smarty
|
||||||
|
* @subpackage plugins
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Smarty plugin
|
* Smarty {html_options} function plugin
|
||||||
* -------------------------------------------------------------
|
*
|
||||||
* Type: function
|
* Type: function<br>
|
||||||
* Name: html_options
|
* Name: html_options<br>
|
||||||
* Input: name (optional) - string default "select"
|
* Input:<br>
|
||||||
* values (required if no options supplied) - array
|
* - name (optional) - string default "select"
|
||||||
* options (required if no values supplied) - associative array
|
* - values (required if no options supplied) - array
|
||||||
* selected (optional) - string default not set
|
* - options (required if no values supplied) - associative array
|
||||||
* output (required if not options supplied) - array
|
* - selected (optional) - string default not set
|
||||||
|
* - output (required if not options supplied) - array
|
||||||
* Purpose: Prints the list of <option> tags generated from
|
* Purpose: Prints the list of <option> tags generated from
|
||||||
* the passed parameters
|
* the passed parameters
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
|
* @uses smarty_function_escape_special_chars()
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_options($params, &$smarty)
|
function smarty_function_html_options($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,26 +1,41 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* File: function.html_radios.php
|
* @subpackage plugins
|
||||||
* Type: function
|
*/
|
||||||
* Name: html_radios
|
|
||||||
* Version: 1.0
|
|
||||||
* Date: 24.Feb.2003
|
/**
|
||||||
* Purpose: Prints out a list of radio input types
|
* Smarty {html_radios} function plugin
|
||||||
* Input: name (optional) - string default "radio"
|
*
|
||||||
* values (required) - array
|
* File: function.html_radios.php<br>
|
||||||
* options (optional) - associative array
|
* Type: function<br>
|
||||||
* checked (optional) - array default not set
|
* Name: html_radios<br>
|
||||||
* separator (optional) - ie <br> or
|
* Date: 24.Feb.2003<br>
|
||||||
* output (optional) - without this one the buttons don't have names
|
* Purpose: Prints out a list of radio input types<br>
|
||||||
* Author: Christopher Kvarme <christopher.kvarme@flashjab.com>
|
* Input:<br>
|
||||||
* Credits: Monte Ohrt <monte@ispi.net>
|
* - name (optional) - string default "radio"
|
||||||
* Examples: {html_radios values=$ids output=$names}
|
* - values (required) - array
|
||||||
* {html_radios values=$ids name='box' separator='<br>' output=$names}
|
* - options (optional) - associative array
|
||||||
* {html_radios values=$ids checked=$checked separator='<br>' output=$names}
|
* - checked (optional) - array default not set
|
||||||
* -------------------------------------------------------------
|
* - separator (optional) - ie <br> or
|
||||||
|
* - output (optional) - without this one the buttons don't have names
|
||||||
|
* Examples:
|
||||||
|
* <pre>
|
||||||
|
* {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}
|
||||||
|
* </pre>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @author Christopher Kvarme <christopher.kvarme@flashjab.com>
|
||||||
|
* @author credits to Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
|
* @uses smarty_function_escape_special_chars()
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_radios($params, &$smarty)
|
function smarty_function_html_radios($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,23 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/**
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: html_select_date
|
*/
|
||||||
* Version: 1.3
|
|
||||||
* Purpose: Prints the dropdowns for date selection.
|
/**
|
||||||
* Author: Andrei Zmievski
|
* Smarty {html_select_date} plugin
|
||||||
*
|
*
|
||||||
* ChangeLog: 1.0 initial release
|
* Type: function<br>
|
||||||
* 1.1 added support for +/- N syntax for begin
|
* Name: html_select_date<br>
|
||||||
|
* Purpose: Prints the dropdowns for date selection.
|
||||||
|
*
|
||||||
|
* ChangeLog:<br>
|
||||||
|
* - 1.0 initial release
|
||||||
|
* - 1.1 added support for +/- N syntax for begin
|
||||||
* and end year values. (Monte)
|
* and end year values. (Monte)
|
||||||
* 1.2 added support for yyyy-mm-dd syntax for
|
* - 1.2 added support for yyyy-mm-dd syntax for
|
||||||
* time value. (Jan Rosier)
|
* time value. (Jan Rosier)
|
||||||
* 1.3 added support for choosing format for
|
* - 1.3 added support for choosing format for
|
||||||
* month values (Gary Loescher)
|
* month values (Gary Loescher)
|
||||||
* 1.3.1 added support for choosing format for
|
* - 1.3.1 added support for choosing format for
|
||||||
* day values (Marcus Bointon)
|
* day values (Marcus Bointon)
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @version 1.3
|
||||||
|
* @author Andrei Zmievski
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_select_date($params, &$smarty)
|
function smarty_function_html_select_date($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: html_select_time
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty {html_select_time} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: html_select_time<br>
|
||||||
* Purpose: Prints the dropdowns for time selection
|
* Purpose: Prints the dropdowns for time selection
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
|
* @uses smarty_make_timestamp()
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_select_time($params, &$smarty)
|
function smarty_function_html_select_time($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,25 +1,39 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: html_table
|
*/
|
||||||
* Version: 1.0
|
|
||||||
* Date: Feb 17, 2003
|
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
/**
|
||||||
* Purpose: make an html table from an array of data
|
* Smarty {html_table} function plugin
|
||||||
* Input: loop = array to loop through
|
*
|
||||||
* cols = number of columns
|
* Type: function<br>
|
||||||
* table_attr = table attributes
|
* Name: html_table<br>
|
||||||
* tr_attr = table row attributes (arrays are cycled)
|
* Date: Feb 17, 2003<br>
|
||||||
* td_attr = table cell attributes (arrays are cycled)
|
* Purpose: make an html table from an array of data<br>
|
||||||
* trailpad = value to pad trailing cells with
|
* Input:<br>
|
||||||
|
* - loop = array to loop through
|
||||||
|
* - cols = number of columns
|
||||||
|
* - table_attr = table attributes
|
||||||
|
* - tr_attr = table row attributes (arrays are cycled)
|
||||||
|
* - td_attr = table cell attributes (arrays are cycled)
|
||||||
|
* - trailpad = value to pad trailing cells with
|
||||||
*
|
*
|
||||||
* Examples: {table loop=$data}
|
* Examples:
|
||||||
* {$table loop=$data cols=4 tr_attr='"bgcolor=red"'}
|
* <pre>
|
||||||
* {$table loop=$data cols=4 tr_attr=$colors}
|
* {table loop=$data}
|
||||||
* -------------------------------------------------------------
|
* {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
|
||||||
|
* {table loop=$data cols=4 tr_attr=$colors}
|
||||||
|
* </pre>
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_html_table($params, &$smarty)
|
function smarty_function_html_table($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,36 +1,50 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: mailto
|
*/
|
||||||
* Version: 1.2
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty {mailto} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: mailto<br>
|
||||||
* Date: May 21, 2002
|
* Date: May 21, 2002
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
|
||||||
* Credits: Jason Sweat (added cc, bcc and subject functionality)
|
|
||||||
* Purpose: automate mailto address link creation, and optionally
|
* Purpose: automate mailto address link creation, and optionally
|
||||||
* encode them.
|
* encode them.<br>
|
||||||
* Input: address = e-mail address
|
* Input:<br>
|
||||||
* text = (optional) text to display, default is address
|
* - address = e-mail address
|
||||||
* encode = (optional) can be one of:
|
* - text = (optional) text to display, default is address
|
||||||
* none : no encoding (default)
|
* - encode = (optional) can be one of:
|
||||||
* javascript : encode with javascript
|
* * none : no encoding (default)
|
||||||
* hex : encode with hexidecimal (no javascript)
|
* * javascript : encode with javascript
|
||||||
* cc = (optional) address(es) to carbon copy
|
* * hex : encode with hexidecimal (no javascript)
|
||||||
* bcc = (optional) address(es) to blind carbon copy
|
* - cc = (optional) address(es) to carbon copy
|
||||||
* subject = (optional) e-mail subject
|
* - bcc = (optional) address(es) to blind carbon copy
|
||||||
* newsgroups = (optional) newsgroup(s) to post to
|
* - subject = (optional) e-mail subject
|
||||||
* followupto = (optional) address(es) to follow up to
|
* - newsgroups = (optional) newsgroup(s) to post to
|
||||||
* extra = (optional) extra tags for the href link
|
* - followupto = (optional) address(es) to follow up to
|
||||||
|
* - extra = (optional) extra tags for the href link
|
||||||
*
|
*
|
||||||
* Examples: {mailto address="me@domain.com"}
|
* Examples:
|
||||||
* {mailto address="me@domain.com" encode="javascript"}
|
* <pre>
|
||||||
* {mailto address="me@domain.com" encode="hex"}
|
* {mailto address="me@domain.com"}
|
||||||
* {mailto address="me@domain.com" subject="Hello to you!"}
|
* {mailto address="me@domain.com" encode="javascript"}
|
||||||
* {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
|
* {mailto address="me@domain.com" encode="hex"}
|
||||||
* {mailto address="me@domain.com" extra='class="mailto"'}
|
* {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"'}
|
||||||
|
* </pre>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @version 1.2
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @author credits to Jason Sweat (added cc, bcc and subject functionality)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_mailto($params, &$smarty)
|
function smarty_function_mailto($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: math
|
*/
|
||||||
* Purpose: handle math computations in template
|
|
||||||
* -------------------------------------------------------------
|
|
||||||
|
/**
|
||||||
|
* Smarty {math} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: math<br>
|
||||||
|
* Purpose: handle math computations in template<br>
|
||||||
|
* @link http://smarty.php.net/manual/en/language.function.math.php {math}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_math($params, &$smarty)
|
function smarty_function_math($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: popup
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty {popup} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: popup<br>
|
||||||
* Purpose: make text pop up in windows via overlib
|
* Purpose: make text pop up in windows via overlib
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_popup($params, &$smarty)
|
function smarty_function_popup($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: function
|
* @subpackage plugins
|
||||||
* Name: popup_init
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty {popup_init} function plugin
|
||||||
|
*
|
||||||
|
* Type: function<br>
|
||||||
|
* Name: popup_init<br>
|
||||||
* Purpose: initialize overlib
|
* Purpose: initialize overlib
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @param array
|
||||||
|
* @param Smarty
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_function_popup_init($params, &$smarty)
|
function smarty_function_popup_init($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: capitalize
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty capitalize modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: capitalize<br>
|
||||||
* Purpose: capitalize words in the string
|
* Purpose: capitalize words in the string
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
|
||||||
|
* capitalize (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_capitalize($string)
|
function smarty_modifier_capitalize($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,17 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: cat
|
*/
|
||||||
* Version: 1.0
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty cat modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: cat<br>
|
||||||
* Date: Feb 24, 2003
|
* Date: Feb 24, 2003
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
* Purpose: catenate a value to a variable
|
||||||
* Purpose: catentate a value to a variable
|
|
||||||
* Input: string to catenate
|
* Input: string to catenate
|
||||||
* Example: {$var|cat:"foo"}
|
* Example: {$var|cat:"foo"}
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
|
||||||
|
* (Smarty online manual)
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_cat($string, $cat)
|
function smarty_modifier_cat($string, $cat)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: count_characteres
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty count_characters modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: count_characteres<br>
|
||||||
* Purpose: count the number of characters in a text
|
* Purpose: count the number of characters in a text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.count.characters.php
|
||||||
|
* count_characters (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param boolean include whitespace in the character count
|
||||||
|
* @return integer
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_count_characters($string, $include_spaces = false)
|
function smarty_modifier_count_characters($string, $include_spaces = false)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: count_paragraphs
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty count_paragraphs modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: count_paragraphs<br>
|
||||||
* Purpose: count the number of paragraphs in a text
|
* Purpose: count the number of paragraphs in a text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
|
||||||
|
* count_paragraphs (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return integer
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_count_paragraphs($string)
|
function smarty_modifier_count_paragraphs($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty count_sentences modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
* Name: count_sentences
|
* Name: count_sentences
|
||||||
* Purpose: count the number of sentences in a text
|
* Purpose: count the number of sentences in a text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
|
||||||
|
* count_sentences (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return integer
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_count_sentences($string)
|
function smarty_modifier_count_sentences($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: count_words
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty count_words modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: count_words<br>
|
||||||
* Purpose: count the number of words in a text
|
* Purpose: count the number of words in a text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.count.words.php
|
||||||
|
* count_words (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return integer
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_count_words($string)
|
function smarty_modifier_count_words($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,17 +1,32 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: date_format
|
*/
|
||||||
* Purpose: format datestamps via strftime
|
|
||||||
* Input: string: input date string
|
/**
|
||||||
* format: strftime format for output
|
* Include the {@link shared.make_timestamp.php} plugin
|
||||||
* default_date: default date if $string is empty
|
|
||||||
* -------------------------------------------------------------
|
|
||||||
*/
|
*/
|
||||||
require_once $this->_get_plugin_filepath('shared','make_timestamp');
|
require_once $this->_get_plugin_filepath('shared','make_timestamp');
|
||||||
|
/**
|
||||||
|
* Smarty date_format modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: date_format<br>
|
||||||
|
* Purpose: format datestamps via strftime<br>
|
||||||
|
* Input:<br>
|
||||||
|
* - string: input date string
|
||||||
|
* - format: strftime format for output
|
||||||
|
* - default_date: default date if $string is empty
|
||||||
|
* @link http://smarty.php.net/manual/en/language.modifier.date.format.php
|
||||||
|
* date_format (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string|void
|
||||||
|
* @uses smarty_make_timestamp()
|
||||||
|
*/
|
||||||
function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
|
function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
|
||||||
{
|
{
|
||||||
if($string != '') {
|
if($string != '') {
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: debug_print_var
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty debug_print_var modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: debug_print_var<br>
|
||||||
* Purpose: formats variable contents for display in the console
|
* Purpose: formats variable contents for display in the console
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
|
||||||
|
* debug_print_var (Smarty online manual)
|
||||||
|
* @param array|object
|
||||||
|
* @param integer
|
||||||
|
* @param integer
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: default
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty default modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: default<br>
|
||||||
* Purpose: designate default value for empty variables
|
* Purpose: designate default value for empty variables
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.default.php
|
||||||
|
* default (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_default($string, $default = '')
|
function smarty_modifier_default($string, $default = '')
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* ------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: escape
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty escape modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: escape<br>
|
||||||
* Purpose: Escape the string according to escapement type
|
* Purpose: Escape the string according to escapement type
|
||||||
* ------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.escape.php
|
||||||
|
* escape (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param html|htmlall|url|quotes|hex|hexentity|javascript
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_escape($string, $esc_type = 'html')
|
function smarty_modifier_escape($string, $esc_type = 'html')
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: indent
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty indent modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: indent<br>
|
||||||
* Purpose: indent lines of text
|
* Purpose: indent lines of text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.indent.php
|
||||||
|
* indent (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param integer
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_indent($string,$chars=4,$char=" ")
|
function smarty_modifier_indent($string,$chars=4,$char=" ")
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: lower
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty lower modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: lower<br>
|
||||||
* Purpose: convert string to lowercase
|
* Purpose: convert string to lowercase
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.lower.php
|
||||||
|
* lower (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_lower($string)
|
function smarty_modifier_lower($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,19 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: nl2br
|
*/
|
||||||
* Version: 1.0
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: nl2br<br>
|
||||||
* Date: Feb 26, 2003
|
* Date: Feb 26, 2003
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
* Purpose: convert \r\n, \r or \n to <<br>>
|
||||||
* Purpose: convert \r\n, \r or \n to <br />
|
* Input:<br>
|
||||||
* Input: contents = contents to replace
|
* - contents = contents to replace
|
||||||
* preceed_test = if true, includes preceeding break tags
|
* - preceed_test = if true, includes preceeding break tags
|
||||||
* in replacement
|
* in replacement
|
||||||
* Example: {$text|nl2br}
|
* Example: {$text|nl2br}
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
|
||||||
|
* nl2br (Smarty online manual)
|
||||||
|
* @version 1.0
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_nl2br($string)
|
function smarty_modifier_nl2br($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: regex_replace
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty regex_replace modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: regex_replace<br>
|
||||||
* Purpose: regular epxression search/replace
|
* Purpose: regular epxression search/replace
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
|
||||||
|
* regex_replace (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string|array
|
||||||
|
* @param string|array
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_regex_replace($string, $search, $replace)
|
function smarty_modifier_regex_replace($string, $search, $replace)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: replace
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty replace modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: replace<br>
|
||||||
* Purpose: simple search/replace
|
* Purpose: simple search/replace
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.replace.php
|
||||||
|
* replace (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_replace($string, $search, $replace)
|
function smarty_modifier_replace($string, $search, $replace)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: spacify
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty spacify modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: spacify<br>
|
||||||
* Purpose: add spaces between characters in a string
|
* Purpose: add spaces between characters in a string
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.spacify.php
|
||||||
|
* spacify (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_spacify($string, $spacify_char = ' ')
|
function smarty_modifier_spacify($string, $spacify_char = ' ')
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: string_format
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty string_format modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: string_format<br>
|
||||||
* Purpose: format strings via sprintf
|
* Purpose: format strings via sprintf
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.string.format.php
|
||||||
|
* string_format (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_string_format($string, $format)
|
function smarty_modifier_string_format($string, $format)
|
||||||
{
|
{
|
||||||
|
@@ -1,17 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: strip
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty strip modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: strip<br>
|
||||||
* Purpose: Replace all repeated spaces, newlines, tabs
|
* Purpose: Replace all repeated spaces, newlines, tabs
|
||||||
* with a single space or supplied replacement string.
|
* with a single space or supplied replacement string.<br>
|
||||||
* Example: {$var|strip} {$var|strip:" "}
|
* Example: {$var|strip} {$var|strip:" "}
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
|
||||||
* Version: 1.0
|
|
||||||
* Date: September 25th, 2002
|
* Date: September 25th, 2002
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.strip.php
|
||||||
|
* strip (Smarty online manual)
|
||||||
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
|
* @version 1.0
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_strip($text, $replace = ' ')
|
function smarty_modifier_strip($text, $replace = ' ')
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: strip_tags
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty strip_tags modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: strip_tags<br>
|
||||||
* Purpose: strip html tags from text
|
* Purpose: strip html tags from text
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
|
||||||
|
* strip_tags (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param boolean
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_strip_tags($string, $replace_with_space = true)
|
function smarty_modifier_strip_tags($string, $replace_with_space = true)
|
||||||
{
|
{
|
||||||
|
@@ -1,14 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: truncate
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty truncate modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: truncate<br>
|
||||||
* Purpose: Truncate a string to a certain length if necessary,
|
* Purpose: Truncate a string to a certain length if necessary,
|
||||||
* optionally splitting in the middle of a word, and
|
* optionally splitting in the middle of a word, and
|
||||||
* appending the $etc string.
|
* appending the $etc string.
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
|
||||||
|
* truncate (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param integer
|
||||||
|
* @param string
|
||||||
|
* @param boolean
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_truncate($string, $length = 80, $etc = '...',
|
function smarty_modifier_truncate($string, $length = 80, $etc = '...',
|
||||||
$break_words = false)
|
$break_words = false)
|
||||||
|
@@ -1,12 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: upper
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty upper modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: upper<br>
|
||||||
* Purpose: convert string to uppercase
|
* Purpose: convert string to uppercase
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.upper.php
|
||||||
|
* upper (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_upper($string)
|
function smarty_modifier_upper($string)
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/*
|
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* Type: modifier
|
* @subpackage plugins
|
||||||
* Name: wordwrap
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smarty wordwrap modifier plugin
|
||||||
|
*
|
||||||
|
* Type: modifier<br>
|
||||||
|
* Name: wordwrap<br>
|
||||||
* Purpose: wrap a string of text at a given length
|
* Purpose: wrap a string of text at a given length
|
||||||
* -------------------------------------------------------------
|
* @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php
|
||||||
|
* wordwrap (Smarty online manual)
|
||||||
|
* @param string
|
||||||
|
* @param integer
|
||||||
|
* @param string
|
||||||
|
* @param boolean
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false)
|
function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false)
|
||||||
{
|
{
|
||||||
|
@@ -1,22 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/**
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
* -------------------------------------------------------------
|
* @package Smarty
|
||||||
* File: outputfilter.trimwhitespace.php
|
* @subpackage plugins
|
||||||
* Type: outputfilter
|
*/
|
||||||
* Name: trimwhitespace
|
|
||||||
* Version: 1.3
|
/**
|
||||||
* Date: Jan 25, 2003
|
* Smarty trimwhitespace outputfilter plugin
|
||||||
|
*
|
||||||
|
* File: outputfilter.trimwhitespace.php<br>
|
||||||
|
* Type: outputfilter<br>
|
||||||
|
* Name: trimwhitespace<br>
|
||||||
|
* Date: Jan 25, 2003<br>
|
||||||
* Purpose: trim leading white space and blank lines from
|
* Purpose: trim leading white space and blank lines from
|
||||||
* template source after it gets interpreted, cleaning
|
* template source after it gets interpreted, cleaning
|
||||||
* up code and saving bandwidth. Does not affect
|
* up code and saving bandwidth. Does not affect
|
||||||
* <PRE></PRE> and <SCRIPT></SCRIPT> blocks.
|
* <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
|
||||||
* Install: Drop into the plugin directory, call
|
* Install: Drop into the plugin directory, call
|
||||||
* $smarty->load_filter('output','trimwhitespace');
|
* <code>$smarty->load_filter('output','trimwhitespace');</code>
|
||||||
* from application.
|
* from application.
|
||||||
* Author: Monte Ohrt <monte@ispi.net>
|
* @author Monte Ohrt <monte@ispi.net>
|
||||||
* Contribs: Lars Noschinski <lars@usenet.noschinski.de>
|
* @author Contributions from Lars Noschinski <lars@usenet.noschinski.de>
|
||||||
* -------------------------------------------------------------
|
* @version 1.3
|
||||||
|
* @param string
|
||||||
|
* @param Smarty
|
||||||
*/
|
*/
|
||||||
function smarty_outputfilter_trimwhitespace($source, &$smarty)
|
function smarty_outputfilter_trimwhitespace($source, &$smarty)
|
||||||
{
|
{
|
||||||
|
@@ -1,10 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Smarty shared plugin
|
||||||
|
* @package Smarty
|
||||||
|
* @subpackage plugins
|
||||||
|
*/
|
||||||
|
|
||||||
/*======================================================================*\
|
|
||||||
Function: smarty_function_escape_special_chars
|
/**
|
||||||
Purpose: used by other smarty functions to escape
|
* escape_special_chars common function
|
||||||
special chars except for already escaped ones
|
*
|
||||||
\*======================================================================*/
|
* Function: smarty_function_escape_special_chars<br>
|
||||||
|
* Purpose: used by other smarty functions to escape
|
||||||
|
* special chars except for already escaped ones
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function smarty_function_escape_special_chars($string)
|
function smarty_function_escape_special_chars($string)
|
||||||
{
|
{
|
||||||
if(!is_array($string)) {
|
if(!is_array($string)) {
|
||||||
|
@@ -1,10 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Smarty shared plugin
|
||||||
|
* @package Smarty
|
||||||
|
* @subpackage plugins
|
||||||
|
*/
|
||||||
|
|
||||||
/*======================================================================*\
|
|
||||||
Function: smarty_make_timestamp
|
/**
|
||||||
Purpose: used by other smarty functions to make a timestamp
|
* Function: smarty_make_timestamp<br>
|
||||||
from a string.
|
* Purpose: used by other smarty functions to make a timestamp
|
||||||
\*======================================================================*/
|
* from a string.
|
||||||
|
* @param string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function smarty_make_timestamp($string)
|
function smarty_make_timestamp($string)
|
||||||
{
|
{
|
||||||
if(empty($string)) {
|
if(empty($string)) {
|
||||||
|
Reference in New Issue
Block a user