Wywołanie funkcji php w smarty

0

Witam mam taki problem otóż mam w pliku php to:

include('include/google-weather.php');  
$city = 'Gdańsk';
		  $temp = 'c';
		  $lang = 'PL';
$smarty->assign("asd" , buildWidget($city, $temp, $lang, true, 'centered') );

i teraz ta funkcja buildWidget znajduje się w include/google-weather.php a ja potrzebuje aby wykonywała się ona w smarty

0

musisz zrobic 2 funkcję - dostosować ją do standardu smarty, i przez ta funkcję wykonać twoją funkcję.
http://www.smarty.net/docsv2/en/plugins.functions.tpl <- dla smarty 3
register function -> dla smarty 2

1 użytkowników online, w tym zalogowanych: 0, gości: 1