Here you may test different sort configuration to understand its behavior.
Also you may verify the multisort feature by pressing the ALT, SHIFT or CTRL key while choosing various columns (try to click the 2nd column once, then while holding SHIFT key, click the 3rd column various times to see it in action - the sort_url must be set by default).
// 4 fields - id_rating_title_votes - t_t_t_t
$default_sort = '1d_t_t_t'; // SORT BY id DESC
$default_sort = 't_1d_t_t'; // SORT BY rating DESC
$default_sort = 't_1d_2a_t'; // SORT BY rating DESC, title ASC
$default_sort = 't_1d_2d_t'; // SORT BY rating DESC, title DESC
$params['sort'] = $sort!='' ? $sort : $default_sort;
$params['sort_init'] = true; // sort all fields
$params['sort_init'] = false; // no sort
$params['sort_init'] = 'fttt'; // sort 2nd, 3rd and 4th fields
$params['sort_order'] = 'adt'; // ascending -> descending -> true ->
$params['sort_order'] = 'ad'; // ascending -> descending ->
$params['sort_order'] = 'da'; // descending -> ascending ->
$params['sort_order'] = 'dat'; // descending -> ascending -> true ->
$params['sort_url'] = 'alert(\'Column clicked: #COLUMN_ID#\');'; // javascript code triggered when column is clicked