update
This commit is contained in:
18
core/plugins/Smarty/function.dictionary.php
Normal file
18
core/plugins/Smarty/function.dictionary.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* formatuje tak date posta, żeby zamiast konkretnej daty wyświetlało : wczoraj , przed wczoraj, x dni temu, x tygodni temu, x miesięcy temu, x lat temu
|
||||
*
|
||||
* @param $str
|
||||
* @return unknown_type
|
||||
*/
|
||||
|
||||
function smarty_function_dictionary($param, &$smarty){
|
||||
|
||||
$dictionaryArray = Registry::Get("dictionary");
|
||||
$keyword = $param["keyword"];
|
||||
|
||||
unset($param["keyword"]);
|
||||
return vsprintf($dictionaryArray[$keyword], $param);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user