Don't use $smarty->assign_by_ref, it doesn't exist in Smarty3