mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
added optional HTML header to output
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
|||||||
|
- added optional HTML header to output (Monte)
|
||||||
- significantly improved config_load performance. (Andrei)
|
- significantly improved config_load performance. (Andrei)
|
||||||
- added format attribute to math function. (Monte)
|
- added format attribute to math function. (Monte)
|
||||||
- added html_select_time custom function. (Andrei)
|
- added html_select_time custom function. (Andrei)
|
||||||
|
@@ -107,6 +107,10 @@ class Smarty
|
|||||||
'count_paragraphs' => 'smarty_mod_count_paragraphs'
|
'count_paragraphs' => 'smarty_mod_count_paragraphs'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
var $version = "3.0.1pl1"; // Smarty version number
|
||||||
|
var $show_info_header = true; // display info header at top of page output
|
||||||
|
|
||||||
// internal vars
|
// internal vars
|
||||||
var $_error_msg = false; // error messages. true/false
|
var $_error_msg = false; // error messages. true/false
|
||||||
var $_tpl_vars = array();
|
var $_tpl_vars = array();
|
||||||
@@ -354,12 +358,20 @@ class Smarty
|
|||||||
|
|
||||||
extract($this->_tpl_vars);
|
extract($this->_tpl_vars);
|
||||||
|
|
||||||
|
if($this->show_info_header)
|
||||||
|
$info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S").' -->'."\n\n";
|
||||||
|
else
|
||||||
|
$info_header = "";
|
||||||
|
|
||||||
// if we just need to display the results, don't perform output
|
// if we just need to display the results, don't perform output
|
||||||
// buffering - for speed
|
// buffering - for speed
|
||||||
if ($display && !$this->caching)
|
if ($display && !$this->caching) {
|
||||||
|
echo $info_header;
|
||||||
include($_compile_file);
|
include($_compile_file);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
echo $info_header;
|
||||||
include($_compile_file);
|
include($_compile_file);
|
||||||
$results = ob_get_contents();
|
$results = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
@@ -107,6 +107,10 @@ class Smarty
|
|||||||
'count_paragraphs' => 'smarty_mod_count_paragraphs'
|
'count_paragraphs' => 'smarty_mod_count_paragraphs'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
var $version = "3.0.1pl1"; // Smarty version number
|
||||||
|
var $show_info_header = true; // display info header at top of page output
|
||||||
|
|
||||||
// internal vars
|
// internal vars
|
||||||
var $_error_msg = false; // error messages. true/false
|
var $_error_msg = false; // error messages. true/false
|
||||||
var $_tpl_vars = array();
|
var $_tpl_vars = array();
|
||||||
@@ -354,12 +358,20 @@ class Smarty
|
|||||||
|
|
||||||
extract($this->_tpl_vars);
|
extract($this->_tpl_vars);
|
||||||
|
|
||||||
|
if($this->show_info_header)
|
||||||
|
$info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S").' -->'."\n\n";
|
||||||
|
else
|
||||||
|
$info_header = "";
|
||||||
|
|
||||||
// if we just need to display the results, don't perform output
|
// if we just need to display the results, don't perform output
|
||||||
// buffering - for speed
|
// buffering - for speed
|
||||||
if ($display && !$this->caching)
|
if ($display && !$this->caching) {
|
||||||
|
echo $info_header;
|
||||||
include($_compile_file);
|
include($_compile_file);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
echo $info_header;
|
||||||
include($_compile_file);
|
include($_compile_file);
|
||||||
$results = ob_get_contents();
|
$results = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
Reference in New Issue
Block a user