| version 1.50, 2012/05/02 12:58:15 |
version 1.51, 2012/05/14 14:53:43 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/subst.inc.php,v 1.49 2011-11-22 16:06:59 igor Exp $ */ |
/* $Platon: Metafox/subst.inc.php,v 1.50 2012-05-02 12:58:15 igor Exp $ */ |
| |
|
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| require_once 'error.inc.php'; |
require_once 'error.inc.php'; |
| Line 532 if ($ezin_tmpl_main->isVar('calendar')) |
|
| Line 532 if ($ezin_tmpl_main->isVar('calendar')) |
|
| $ezin_tmpl_main->set(array('calendar' => '')); |
$ezin_tmpl_main->set(array('calendar' => '')); |
| } |
} |
| } |
} |
| |
/* |
| |
* Building boxes |
| |
*/ |
| |
|
| |
$ezin_tmpl_main_vars = $ezin_tmpl_main->getVars(); |
| |
$boxes = array(); |
| |
$box_prefix = 'box_'; |
| |
foreach($ezin_tmpl_main_vars as $var) { |
| |
if (substr($var, 0, strlen($box_prefix)) == $box_prefix) { |
| |
$name = substr($var, strlen($box_prefix)); |
| |
$cache_id = $box_prefix.$ezin_cfg['theme']['name'].'_'.$name; |
| |
$cache_ar = ezin_cache_load($cache_id); |
| |
if (ezin_cache_load($cache_id) == false) { |
| |
$boxes[] = $name; |
| |
} else { |
| |
$ezin_tmpl_main->setCode($box_prefix.$name, $cache_ar['content']); |
| |
} |
| |
} |
| |
} |
| |
if (count($boxes) > 0) { |
| |
$boxes_val = ezin_get_boxes($boxes); |
| |
foreach($boxes_val as $val) { |
| |
$cache_id = $box_prefix.$ezin_cfg['theme']['name'].'_'.$val['name']; |
| |
ezin_handle_special_tags($val['bodytext']); |
| |
$template_key = (strlen($val['template_key']) > 0) ? '.'.$val['template_key'] : ''; |
| |
$box = new HTML_Template_Platon($ezin_sys['tmpl']['box'].$template_key, |
| |
HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP); |
| |
$box->set('bodytext', $val['bodytext']); |
| |
$output = $box->getCode(); |
| |
ezin_cache_save($cache_id, $output); |
| |
$ezin_tmpl_main->setCode($box_prefix.$val['name'], $output); |
| |
} |
| |
} |
| |
|
| |
|
| /* |
/* |
| * Creating poll |
* Creating poll |