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:
0
gulliver/includes/smarty_plugins/function.pmos.php
Normal file
0
gulliver/includes/smarty_plugins/function.pmos.php
Normal 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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user