function get_friends + smarty template