Adding a smarty plugin function to support load pmos translations on smarty templates

- A new file containing the smarty plugin definition was added on gulliver/includes/smarty_plugins path
- Currently it was added to used only with mvc layout (it is implemented on Siplified UI views)
This commit is contained in:
Erik Amaru Ortiz
2013-05-15 10:54:17 -04:00
parent 3ab37b7059
commit 20bd8ab11d
2 changed files with 2 additions and 2 deletions

View File

@@ -543,6 +543,7 @@ class SkinEngine
private function _mvc() private function _mvc()
{ {
require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php'; // put full path to Smarty.class.php require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php'; // put full path to Smarty.class.php
require_once PATH_GULLIVER_HOME . 'includes' . PATH_SEP . 'smarty_plugins' . PATH_SEP . 'function.pmos.php';
G::LoadClass('serverConfiguration'); G::LoadClass('serverConfiguration');
$oServerConf =& serverConf::getSingleton(); $oServerConf =& serverConf::getSingleton();
$oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher =& headPublisher::getSingleton();
@@ -552,6 +553,7 @@ class SkinEngine
$smarty->compile_dir = PATH_SMARTY_C; $smarty->compile_dir = PATH_SMARTY_C;
$smarty->cache_dir = PATH_SMARTY_CACHE; $smarty->cache_dir = PATH_SMARTY_CACHE;
$smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs'; $smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
$smarty->register_function('translate', 'translate');
$viewVars = $oHeadPublisher->getVars(); $viewVars = $oHeadPublisher->getVars();
@@ -784,6 +786,4 @@ class SkinEngine
$smarty->display($this->layoutFile['basename']); $smarty->display($this->layoutFile['basename']);
} }
} }
} }