Initial commit
This commit is contained in:
commit
998d011cd3
233 changed files with 36893 additions and 0 deletions
33
onyx/modules/templates/smarty/plugins/function.text.php
Normal file
33
onyx/modules/templates/smarty/plugins/function.text.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage PluginsFunction
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty {text} function plugin
|
||||
*
|
||||
* Type: function<br>
|
||||
* Name: text<br>
|
||||
* @author Némunaire <nemunaire@gmail.com>
|
||||
*/
|
||||
function smarty_function_text($params, &$template)
|
||||
{
|
||||
if (empty($params["lang"]))
|
||||
{
|
||||
if (isset($params['assign']))
|
||||
$template->assign($params['assign'], Lang::getText($params["file"], $params["path"]));
|
||||
else
|
||||
return Lang::getText($params["file"], $params["path"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($params['assign']))
|
||||
$template->assign($params['assign'], Lang::getText($params["file"], $params["path"], $params["lang"]));
|
||||
else
|
||||
return Lang::getText($params["file"], $params["path"], $params["lang"]);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in a new issue