mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
*** empty log message ***
This commit is contained in:
@@ -56,15 +56,15 @@ function smarty_mod_spacify($string, $spacify_char = ' ')
|
|||||||
|
|
||||||
|
|
||||||
/*============================================*\
|
/*============================================*\
|
||||||
Custom functions
|
Custom tag functions
|
||||||
\*============================================*/
|
\*============================================*/
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
Function: smarty_func_options
|
Function: smarty_func_html_options
|
||||||
Purpose: Returns the list of <option> tags generated from
|
Purpose: Returns the list of <option> tags generated from
|
||||||
the passed parameters
|
the passed parameters
|
||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function smarty_func_options()
|
function smarty_func_html_options()
|
||||||
{
|
{
|
||||||
extract(func_get_arg(0));
|
extract(func_get_arg(0));
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ class Smarty
|
|||||||
|
|
||||||
var $config_dir = "configs"; // directory where config files are located
|
var $config_dir = "configs"; // directory where config files are located
|
||||||
|
|
||||||
var $_custom_funcs = array( 'options' => 'smarty_func_options'
|
var $_custom_tags = array( 'html_options' => 'smarty_func_html_options'
|
||||||
);
|
);
|
||||||
|
|
||||||
var $_modifiers = array( 'lower' => 'strtolower',
|
var $_modifiers = array( 'lower' => 'strtolower',
|
||||||
@@ -408,8 +408,8 @@ class Smarty
|
|||||||
return $this->left_delimiter.$tag_command.$this->right_delimiter;
|
return $this->left_delimiter.$tag_command.$this->right_delimiter;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (isset($this->_custom_funcs[$tag_command])) {
|
if (isset($this->_custom_tags[$tag_command])) {
|
||||||
return $this->_compile_custom_func($tag_command, $tag_args);
|
return $this->_compile_custom_tag($tag_command, $tag_args);
|
||||||
} else
|
} else
|
||||||
/* TODO syntax error: unknown tag */
|
/* TODO syntax error: unknown tag */
|
||||||
return "";
|
return "";
|
||||||
@@ -417,10 +417,10 @@ class Smarty
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _compile_custom_func($func_name, $tag_args)
|
function _compile_custom_tag($tag_command, $tag_args)
|
||||||
{
|
{
|
||||||
$attrs = $this->_parse_attrs($tag_args);
|
$attrs = $this->_parse_attrs($tag_args);
|
||||||
$function = $this->_custom_funcs[$func_name];
|
$function = $this->_custom_tags[$tag_command];
|
||||||
foreach ($attrs as $arg_name => $arg_value)
|
foreach ($attrs as $arg_name => $arg_value)
|
||||||
$arg_list[] = "'$arg_name' => $arg_value";
|
$arg_list[] = "'$arg_name' => $arg_value";
|
||||||
|
|
||||||
|
@@ -18,4 +18,4 @@ My interests are:
|
|||||||
{/section}
|
{/section}
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
{options output=$FirstName values=$LastName selected="Case"}
|
{html_options output=$FirstName values=$LastName selected="Case"}
|
||||||
|
@@ -41,7 +41,7 @@ class Smarty
|
|||||||
|
|
||||||
var $config_dir = "configs"; // directory where config files are located
|
var $config_dir = "configs"; // directory where config files are located
|
||||||
|
|
||||||
var $_custom_funcs = array( 'options' => 'smarty_func_options'
|
var $_custom_tags = array( 'html_options' => 'smarty_func_html_options'
|
||||||
);
|
);
|
||||||
|
|
||||||
var $_modifiers = array( 'lower' => 'strtolower',
|
var $_modifiers = array( 'lower' => 'strtolower',
|
||||||
@@ -408,8 +408,8 @@ class Smarty
|
|||||||
return $this->left_delimiter.$tag_command.$this->right_delimiter;
|
return $this->left_delimiter.$tag_command.$this->right_delimiter;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (isset($this->_custom_funcs[$tag_command])) {
|
if (isset($this->_custom_tags[$tag_command])) {
|
||||||
return $this->_compile_custom_func($tag_command, $tag_args);
|
return $this->_compile_custom_tag($tag_command, $tag_args);
|
||||||
} else
|
} else
|
||||||
/* TODO syntax error: unknown tag */
|
/* TODO syntax error: unknown tag */
|
||||||
return "";
|
return "";
|
||||||
@@ -417,10 +417,10 @@ class Smarty
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _compile_custom_func($func_name, $tag_args)
|
function _compile_custom_tag($tag_command, $tag_args)
|
||||||
{
|
{
|
||||||
$attrs = $this->_parse_attrs($tag_args);
|
$attrs = $this->_parse_attrs($tag_args);
|
||||||
$function = $this->_custom_funcs[$func_name];
|
$function = $this->_custom_tags[$tag_command];
|
||||||
foreach ($attrs as $arg_name => $arg_value)
|
foreach ($attrs as $arg_name => $arg_value)
|
||||||
$arg_list[] = "'$arg_name' => $arg_value";
|
$arg_list[] = "'$arg_name' => $arg_value";
|
||||||
|
|
||||||
|
@@ -18,4 +18,4 @@ My interests are:
|
|||||||
{/section}
|
{/section}
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
{options output=$FirstName values=$LastName selected="Case"}
|
{html_options output=$FirstName values=$LastName selected="Case"}
|
||||||
|
Reference in New Issue
Block a user