Add switch support to smarty via plugin

This commit is contained in:
2011-12-20 19:12:29 +00:00
parent 910d8858de
commit 4b22dc5e70
2 changed files with 293 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class StatusBoard_Main extends SihnonFramework_Main {
$this->smarty->compile_dir = static::makeAbsolutePath($smarty_tmp . '/templates');
$this->smarty->cache_dir = static::makeAbsolutePath($smarty_tmp . '/cache');
$this->smarty->config_dir = static::makeAbsolutePath($smarty_tmp . '/config');
$this->smarty->plugins_dir[]= static::makeAbsolutePath('../source/webui/smarty/plugins');
$this->smarty->plugins_dir[]= static::makeAbsolutePath('../source/smarty/plugins');
$this->smarty->registerPlugin('modifier', 'formatDuration', array('StatusBoard_Main', 'formatDuration'));
$this->smarty->registerPlugin('modifier', 'formatFilesize', array('StatusBoard_Main', 'formatFilesize'));