| 1 |
<?php |
<?php |
| 2 |
//$Id$ |
//$Id: topichubs_most_recent.views_default.inc,v 1.1 2009/03/03 23:51:06 febbraro Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Load all plugin defined views. |
* Load all plugin defined views. |
| 6 |
*/ |
*/ |
| 7 |
function topichubs_most_recent_views_default_views() { |
function topichubs_most_recent_views_default_views() { |
| 8 |
$view = new view; |
$view = new view; |
| 9 |
$view->name = 'topichub_most_recent'; |
$view->name = 'topichub_most_recent'; |
| 10 |
$view->description = 'Returns the most recent stories for a particular topic hub.'; |
$view->description = 'Returns the most recent stories for a particular topic hub.'; |
| 11 |
$view->tag = 'Topic Hub'; |
$view->tag = 'Topic Hub'; |
| 12 |
$view->view_php = ''; |
$view->view_php = ''; |
| 13 |
$view->base_table = 'node'; |
$view->base_table = 'node'; |
| 14 |
$view->is_cacheable = FALSE; |
$view->is_cacheable = FALSE; |
| 15 |
$view->api_version = 2; |
$view->api_version = 2; |
| 16 |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
| 17 |
$handler = $view->new_display('default', 'Defaults', 'default'); |
$handler = $view->new_display('default', 'Defaults', 'default'); |
| 18 |
$handler->override_option('fields', array( |
$handler->override_option('fields', array( |
| 19 |
'nid' => array( |
'nid' => array( |
| 20 |
'label' => '', |
'label' => '', |
| 21 |
'link_to_node' => 0, |
'link_to_node' => 0, |
| 22 |
'exclude' => 1, |
'exclude' => 1, |
| 23 |
'id' => 'nid', |
'id' => 'nid', |
| 24 |
'table' => 'node', |
'table' => 'node', |
| 25 |
'field' => 'nid', |
'field' => 'nid', |
| 26 |
'override' => array( |
'override' => array( |
| 27 |
'button' => 'Override', |
'button' => 'Override', |
| 28 |
), |
), |
| 29 |
'relationship' => 'none', |
'relationship' => 'none', |
| 30 |
), |
), |
| 31 |
'title' => array( |
'title' => array( |
| 32 |
'label' => '', |
'label' => '', |
| 33 |
'link_to_node' => 1, |
'link_to_node' => 1, |
| 34 |
'exclude' => 0, |
'exclude' => 0, |
| 35 |
'id' => 'title', |
'id' => 'title', |
| 36 |
'table' => 'node', |
'table' => 'node', |
| 37 |
'field' => 'title', |
'field' => 'title', |
| 38 |
'override' => array( |
'override' => array( |
| 39 |
'button' => 'Override', |
'button' => 'Override', |
| 40 |
), |
), |
| 41 |
'relationship' => 'none', |
'relationship' => 'none', |
| 42 |
), |
), |
| 43 |
'teaser' => array( |
'teaser' => array( |
| 44 |
'label' => '', |
'label' => '', |
| 45 |
'exclude' => 0, |
'exclude' => 0, |
| 46 |
'id' => 'teaser', |
'id' => 'teaser', |
| 47 |
'table' => 'node_revisions', |
'table' => 'node_revisions', |
| 48 |
'field' => 'teaser', |
'field' => 'teaser', |
| 49 |
'relationship' => 'none', |
'relationship' => 'none', |
| 50 |
), |
), |
| 51 |
'type' => array( |
'type' => array( |
| 52 |
'label' => '', |
'label' => '', |
| 53 |
'link_to_node' => 0, |
'link_to_node' => 0, |
| 54 |
'exclude' => 1, |
'exclude' => 1, |
| 55 |
'id' => 'type', |
'id' => 'type', |
| 56 |
'table' => 'node', |
'table' => 'node', |
| 57 |
'field' => 'type', |
'field' => 'type', |
| 58 |
'override' => array( |
'override' => array( |
| 59 |
'button' => 'Override', |
'button' => 'Override', |
| 60 |
), |
), |
| 61 |
'relationship' => 'none', |
'relationship' => 'none', |
| 62 |
), |
), |
| 63 |
)); |
)); |
| 64 |
$handler->override_option('sorts', array( |
$handler->override_option('sorts', array( |
| 65 |
'created' => array( |
'created' => array( |
| 66 |
'order' => 'DESC', |
'order' => 'DESC', |
| 67 |
'granularity' => 'second', |
'granularity' => 'second', |
| 68 |
'id' => 'created', |
'id' => 'created', |
| 69 |
'table' => 'node', |
'table' => 'node', |
| 70 |
'field' => 'created', |
'field' => 'created', |
| 71 |
'relationship' => 'none', |
'relationship' => 'none', |
| 72 |
), |
), |
| 73 |
)); |
)); |
| 74 |
$handler->override_option('arguments', array( |
$handler->override_option('arguments', array( |
| 75 |
'nid' => array( |
'nid' => array( |
| 76 |
'default_action' => 'ignore', |
'default_action' => 'ignore', |
| 77 |
'style_plugin' => 'default_summary', |
'style_plugin' => 'default_summary', |
| 78 |
'style_options' => array(), |
'style_options' => array(), |
| 79 |
'wildcard' => 'all', |
'wildcard' => 'all', |
| 80 |
'wildcard_substitution' => 'All', |
'wildcard_substitution' => 'All', |
| 81 |
'title' => '%1: Most Recent Content', |
'title' => '%1: Most Recent Content', |
| 82 |
'default_argument_type' => 'fixed', |
'default_argument_type' => 'fixed', |
| 83 |
'default_argument' => '', |
'default_argument' => '', |
| 84 |
'validate_type' => 'none', |
'validate_type' => 'none', |
| 85 |
'validate_fail' => 'not found', |
'validate_fail' => 'not found', |
| 86 |
'id' => 'nid', |
'id' => 'nid', |
| 87 |
'table' => 'topichub', |
'table' => 'topichub', |
| 88 |
'field' => 'nid', |
'field' => 'nid', |
| 89 |
'relationship' => 'none', |
'relationship' => 'none', |
| 90 |
'default_options_div_prefix' => '', |
'default_options_div_prefix' => '', |
| 91 |
'default_argument_user' => 0, |
'default_argument_user' => 0, |
| 92 |
'default_argument_fixed' => '', |
'default_argument_fixed' => '', |
| 93 |
'default_argument_php' => '', |
'default_argument_php' => '', |
| 94 |
'validate_argument_node_type' => array(), |
'validate_argument_node_type' => array(), |
| 95 |
'validate_argument_node_access' => 0, |
'validate_argument_node_access' => 0, |
| 96 |
'validate_argument_nid_type' => 'nid', |
'validate_argument_nid_type' => 'nid', |
| 97 |
'validate_argument_vocabulary' => array(), |
'validate_argument_vocabulary' => array(), |
| 98 |
'validate_argument_type' => 'tid', |
'validate_argument_type' => 'tid', |
| 99 |
'validate_argument_php' => '', |
'validate_argument_php' => '', |
| 100 |
'override' => array( |
'override' => array( |
| 101 |
'button' => 'Override', |
'button' => 'Override', |
| 102 |
), |
), |
| 103 |
), |
), |
| 104 |
)); |
)); |
| 105 |
$handler->override_option('filters', array( |
$handler->override_option('filters', array( |
| 106 |
'status_extra' => array( |
'status_extra' => array( |
| 107 |
'operator' => '=', |
'operator' => '=', |
| 108 |
'value' => '', |
'value' => '', |
| 109 |
'group' => '0', |
'group' => '0', |
| 110 |
'exposed' => FALSE, |
'exposed' => FALSE, |
| 111 |
'expose' => array( |
'expose' => array( |
| 112 |
'operator' => FALSE, |
'operator' => FALSE, |
| 113 |
'label' => '', |
'label' => '', |
| 114 |
), |
), |
| 115 |
'id' => 'status_extra', |
'id' => 'status_extra', |
| 116 |
'table' => 'node', |
'table' => 'node', |
| 117 |
'field' => 'status_extra', |
'field' => 'status_extra', |
| 118 |
'relationship' => 'none', |
'relationship' => 'none', |
| 119 |
), |
), |
| 120 |
)); |
)); |
| 121 |
$handler->override_option('access', array( |
$handler->override_option('access', array( |
| 122 |
'type' => 'none', |
'type' => 'none', |
| 123 |
)); |
)); |
| 124 |
$handler->override_option('title', 'Most Recent'); |
$handler->override_option('title', 'Most Recent'); |
| 125 |
$handler->override_option('offset', 0); |
$handler->override_option('offset', 0); |
| 126 |
$handler->override_option('use_more', 1); |
$handler->override_option('use_more', 1); |
| 127 |
$handler->override_option('distinct', 1); |
$handler->override_option('distinct', 1); |
| 128 |
$handler->override_option('style_plugin', 'list'); |
$handler->override_option('style_plugin', 'list'); |
| 129 |
$handler->override_option('style_options', array( |
$handler->override_option('style_options', array( |
| 130 |
'type' => 'ul', |
'type' => 'ul', |
| 131 |
)); |
)); |
| 132 |
$handler = $view->new_display('block', 'Most Recent', 'block_1'); |
$handler = $view->new_display('block', 'Most Recent', 'block_1'); |
| 133 |
$handler->override_option('block_description', ''); |
$handler->override_option('block_description', ''); |
| 134 |
$handler->override_option('block_caching', -1); |
$handler->override_option('block_caching', -1); |
| 135 |
$handler = $view->new_display('page', 'Most Recent Page ', 'page_1'); |
$handler = $view->new_display('page', 'Most Recent Page ', 'page_1'); |
| 136 |
$handler->override_option('use_pager', '1'); |
$handler->override_option('use_pager', '1'); |
| 137 |
$handler->override_option('path', 'topichub-detail/most-recent'); |
$handler->override_option('path', 'topichub-detail/most-recent'); |
| 138 |
$handler->override_option('menu', array( |
$handler->override_option('menu', array( |
| 139 |
'type' => 'none', |
'type' => 'none', |
| 140 |
'title' => '', |
'title' => '', |
| 141 |
'weight' => 0, |
'weight' => 0, |
| 142 |
'name' => 'navigation', |
'name' => 'navigation', |
| 143 |
)); |
)); |
| 144 |
$handler->override_option('tab_options', array( |
$handler->override_option('tab_options', array( |
| 145 |
'type' => 'none', |
'type' => 'none', |
| 146 |
'title' => '', |
'title' => '', |
| 147 |
'weight' => 0, |
'weight' => 0, |
| 148 |
)); |
)); |
| 149 |
|
|
| 150 |
return array($view->name => $view); |
return array($view->name => $view); |
| 151 |
} |
} |
| 152 |
|
|