I would like to create a custom views, because some database fields are not accessible by drupal views UI. I just exported an existing view into a file called my_module_views_default.inc that contains the hook_views_default_views() function. and by the drupal views2 document state that the hook gets called automatically, but it doesn't. Also i want to know the path, we are giving the path in the code here
$handler->override_option('path', 'my_earnings');
That means we can see the views in the link http://localhost/drupal6/my_earnings ??
and in my .module file, i use the hook_views_api as follows
function mymodule_views_api() {
return array( 'api' => 2, 'path' => drupal_get_path('module', 'my_earnings'), ); }