Drupal 6 Wyświetleń 2: Ustawianie argumentów daty

Przekazywanie uid jako argumentu działa poprawnie z tym kodem:

$bouts = views_get_view_result('Results', 'page_1', array($user->uid));

Linia klucza w views_get_view_result, która ustawia argumenty, to:

$view->set_arguments($args);

Ale co z przechodzącymi zakresami dat?

Ponadto, jeśli coś jest określone jako filtr w widoku, czy istnieje sposób na proramatyczną jego zmianę?

views_get_view_result:

/**
* Investigate the result of a view.
* from Drupal.org. 
*
* @param string $viewname
*      The name of the view to retrieve the data from.
* @param string $display_id
*      The display id. On the edit page for the view in question, you'll find
*      a list of displays at the left side of the control area. "Defaults"
*      will be at the top of that list. Hover your cursor over the name of the
*      display you want to use. A URL will appear in the status bar of your
*      browser. This is usually at the bottom of the window, in the chrome.
*      Everything after #views-tab- is the display ID, e.g. page_1.
* @param array $args
*      Array of arguments. (no keys, just args)
* @return
*      array
*          An array containing an object for each view item.
*      string
*          If the view is not found a message is returned.
*/
function views_get_view_result($viewname, $display_id = NULL, $args = NULL) {
  $view = views_get_view($viewname);
  if (is_object($view)) {
    if (is_array($args)) {
      $view->set_arguments($args);
    }
    if (is_string($display_id)) {
      $view->set_display($display_id);
    }
    else {
      $view->init_display();
    }
    $view->pre_execute();
    $view->execute();
/*  print "<pre> $viewname: $display_id";
    print_r(get_class_methods($view));  */
    return $view->result;
  }
  else {
    return t('View %viewname not found.', array('%viewname' => $viewname));
  }
}

questionAnswers(2)

yourAnswerToTheQuestion