| 1 |
<?php |
<?php |
| 2 |
//$Id$ |
//$Id: topichubs_most_comments.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_comments_views_default_views() { |
function topichubs_most_comments_views_default_views() { |
| 8 |
$view = new view; |
$view = new view; |
| 9 |
$view->name = 'topichub_most_comments'; |
$view->name = 'topichub_most_comments'; |
| 10 |
$view->description = 'This block will contain a list of the content for this topic hub that has the most comments.'; |
$view->description = 'This block will contain a list of the content for this topic hub that has the most comments.'; |
| 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 |
'type' => array( |
'type' => array( |
| 44 |
'label' => '', |
'label' => '', |
| 45 |
'link_to_node' => 0, |
'link_to_node' => 0, |
| 46 |
'exclude' => 1, |
'exclude' => 1, |
| 47 |
'id' => 'type', |
'id' => 'type', |
| 48 |
'table' => 'node', |
'table' => 'node', |
| 49 |
'field' => 'type', |
'field' => 'type', |
| 50 |
'override' => array( |
'override' => array( |
| 51 |
'button' => 'Override', |
'button' => 'Override', |
| 52 |
), |
), |
| 53 |
'relationship' => 'none', |
'relationship' => 'none', |
| 54 |
), |
), |
| 55 |
'comment_count' => array( |
'comment_count' => array( |
| 56 |
'label' => '', |
'label' => '', |
| 57 |
'set_precision' => FALSE, |
'set_precision' => FALSE, |
| 58 |
'precision' => 0, |
'precision' => 0, |
| 59 |
'decimal' => '.', |
'decimal' => '.', |
| 60 |
'separator' => ',', |
'separator' => ',', |
| 61 |
'prefix' => '', |
'prefix' => '', |
| 62 |
'suffix' => '', |
'suffix' => '', |
| 63 |
'exclude' => 1, |
'exclude' => 1, |
| 64 |
'id' => 'comment_count', |
'id' => 'comment_count', |
| 65 |
'table' => 'node_comment_statistics', |
'table' => 'node_comment_statistics', |
| 66 |
'field' => 'comment_count', |
'field' => 'comment_count', |
| 67 |
'override' => array( |
'override' => array( |
| 68 |
'button' => 'Override', |
'button' => 'Override', |
| 69 |
), |
), |
| 70 |
'relationship' => 'none', |
'relationship' => 'none', |
| 71 |
), |
), |
| 72 |
)); |
)); |
| 73 |
$handler->override_option('sorts', array( |
$handler->override_option('sorts', array( |
| 74 |
'comment_count' => array( |
'comment_count' => array( |
| 75 |
'order' => 'DESC', |
'order' => 'DESC', |
| 76 |
'id' => 'comment_count', |
'id' => 'comment_count', |
| 77 |
'table' => 'node_comment_statistics', |
'table' => 'node_comment_statistics', |
| 78 |
'field' => 'comment_count', |
'field' => 'comment_count', |
| 79 |
'override' => array( |
'override' => array( |
| 80 |
'button' => 'Override', |
'button' => 'Override', |
| 81 |
), |
), |
| 82 |
'relationship' => 'none', |
'relationship' => 'none', |
| 83 |
), |
), |
| 84 |
)); |
)); |
| 85 |
$handler->override_option('arguments', array( |
$handler->override_option('arguments', array( |
| 86 |
'nid' => array( |
'nid' => array( |
| 87 |
'default_action' => 'ignore', |
'default_action' => 'ignore', |
| 88 |
'style_plugin' => 'default_summary', |
'style_plugin' => 'default_summary', |
| 89 |
'style_options' => array(), |
'style_options' => array(), |
| 90 |
'wildcard' => 'all', |
'wildcard' => 'all', |
| 91 |
'wildcard_substitution' => 'All', |
'wildcard_substitution' => 'All', |
| 92 |
'title' => '%1: Most Commented', |
'title' => '%1: Most Commented', |
| 93 |
'default_argument_type' => 'fixed', |
'default_argument_type' => 'fixed', |
| 94 |
'default_argument' => '', |
'default_argument' => '', |
| 95 |
'validate_type' => 'none', |
'validate_type' => 'none', |
| 96 |
'validate_fail' => 'not found', |
'validate_fail' => 'not found', |
| 97 |
'id' => 'nid', |
'id' => 'nid', |
| 98 |
'table' => 'topichub', |
'table' => 'topichub', |
| 99 |
'field' => 'nid', |
'field' => 'nid', |
| 100 |
'relationship' => 'none', |
'relationship' => 'none', |
| 101 |
'default_options_div_prefix' => '', |
'default_options_div_prefix' => '', |
| 102 |
'default_argument_user' => 0, |
'default_argument_user' => 0, |
| 103 |
'default_argument_fixed' => '', |
'default_argument_fixed' => '', |
| 104 |
'default_argument_php' => '', |
'default_argument_php' => '', |
| 105 |
'validate_argument_node_type' => array(), |
'validate_argument_node_type' => array(), |
| 106 |
'validate_argument_node_access' => 0, |
'validate_argument_node_access' => 0, |
| 107 |
'validate_argument_nid_type' => 'nid', |
'validate_argument_nid_type' => 'nid', |
| 108 |
'validate_argument_vocabulary' => array(), |
'validate_argument_vocabulary' => array(), |
| 109 |
'validate_argument_type' => 'tid', |
'validate_argument_type' => 'tid', |
| 110 |
'validate_argument_php' => '', |
'validate_argument_php' => '', |
| 111 |
), |
), |
| 112 |
)); |
)); |
| 113 |
$handler->override_option('filters', array( |
$handler->override_option('filters', array( |
| 114 |
'status_extra' => array( |
'status_extra' => array( |
| 115 |
'operator' => '=', |
'operator' => '=', |
| 116 |
'value' => '', |
'value' => '', |
| 117 |
'group' => '0', |
'group' => '0', |
| 118 |
'exposed' => FALSE, |
'exposed' => FALSE, |
| 119 |
'expose' => array( |
'expose' => array( |
| 120 |
'operator' => FALSE, |
'operator' => FALSE, |
| 121 |
'label' => '', |
'label' => '', |
| 122 |
), |
), |
| 123 |
'id' => 'status_extra', |
'id' => 'status_extra', |
| 124 |
'table' => 'node', |
'table' => 'node', |
| 125 |
'field' => 'status_extra', |
'field' => 'status_extra', |
| 126 |
'override' => array( |
'override' => array( |
| 127 |
'button' => 'Override', |
'button' => 'Override', |
| 128 |
), |
), |
| 129 |
'relationship' => 'none', |
'relationship' => 'none', |
| 130 |
), |
), |
| 131 |
'comment_count' => array( |
'comment_count' => array( |
| 132 |
'operator' => '>=', |
'operator' => '>=', |
| 133 |
'value' => array( |
'value' => array( |
| 134 |
'value' => '1', |
'value' => '1', |
| 135 |
'min' => '', |
'min' => '', |
| 136 |
'max' => '', |
'max' => '', |
| 137 |
), |
), |
| 138 |
'group' => '0', |
'group' => '0', |
| 139 |
'exposed' => FALSE, |
'exposed' => FALSE, |
| 140 |
'expose' => array( |
'expose' => array( |
| 141 |
'operator' => FALSE, |
'operator' => FALSE, |
| 142 |
'label' => '', |
'label' => '', |
| 143 |
), |
), |
| 144 |
'id' => 'comment_count', |
'id' => 'comment_count', |
| 145 |
'table' => 'node_comment_statistics', |
'table' => 'node_comment_statistics', |
| 146 |
'field' => 'comment_count', |
'field' => 'comment_count', |
| 147 |
'override' => array( |
'override' => array( |
| 148 |
'button' => 'Override', |
'button' => 'Override', |
| 149 |
), |
), |
| 150 |
'relationship' => 'none', |
'relationship' => 'none', |
| 151 |
), |
), |
| 152 |
)); |
)); |
| 153 |
$handler->override_option('access', array( |
$handler->override_option('access', array( |
| 154 |
'type' => 'none', |
'type' => 'none', |
| 155 |
)); |
)); |
| 156 |
$handler->override_option('title', 'Most Comments'); |
$handler->override_option('title', 'Most Comments'); |
| 157 |
$handler->override_option('items_per_page', 5); |
$handler->override_option('items_per_page', 5); |
| 158 |
$handler->override_option('use_more', 1); |
$handler->override_option('use_more', 1); |
| 159 |
$handler->override_option('distinct', 1); |
$handler->override_option('distinct', 1); |
| 160 |
$handler->override_option('style_plugin', 'list'); |
$handler->override_option('style_plugin', 'list'); |
| 161 |
$handler = $view->new_display('block', 'Most Comments', 'block_1'); |
$handler = $view->new_display('block', 'Most Comments', 'block_1'); |
| 162 |
$handler->override_option('block_description', ''); |
$handler->override_option('block_description', ''); |
| 163 |
$handler->override_option('block_caching', -1); |
$handler->override_option('block_caching', -1); |
| 164 |
$handler = $view->new_display('page', 'Most Comments Page', 'page_1'); |
$handler = $view->new_display('page', 'Most Comments Page', 'page_1'); |
| 165 |
$handler->override_option('fields', array( |
$handler->override_option('fields', array( |
| 166 |
'nid' => array( |
'nid' => array( |
| 167 |
'label' => '', |
'label' => '', |
| 168 |
'link_to_node' => 0, |
'link_to_node' => 0, |
| 169 |
'exclude' => 1, |
'exclude' => 1, |
| 170 |
'id' => 'nid', |
'id' => 'nid', |
| 171 |
'table' => 'node', |
'table' => 'node', |
| 172 |
'field' => 'nid', |
'field' => 'nid', |
| 173 |
'override' => array( |
'override' => array( |
| 174 |
'button' => 'Override', |
'button' => 'Override', |
| 175 |
), |
), |
| 176 |
'relationship' => 'none', |
'relationship' => 'none', |
| 177 |
), |
), |
| 178 |
'title' => array( |
'title' => array( |
| 179 |
'label' => '', |
'label' => '', |
| 180 |
'link_to_node' => 1, |
'link_to_node' => 1, |
| 181 |
'exclude' => 0, |
'exclude' => 0, |
| 182 |
'id' => 'title', |
'id' => 'title', |
| 183 |
'table' => 'node', |
'table' => 'node', |
| 184 |
'field' => 'title', |
'field' => 'title', |
| 185 |
'override' => array( |
'override' => array( |
| 186 |
'button' => 'Override', |
'button' => 'Override', |
| 187 |
), |
), |
| 188 |
'relationship' => 'none', |
'relationship' => 'none', |
| 189 |
), |
), |
| 190 |
'type' => array( |
'type' => array( |
| 191 |
'label' => '', |
'label' => '', |
| 192 |
'link_to_node' => 0, |
'link_to_node' => 0, |
| 193 |
'exclude' => 1, |
'exclude' => 1, |
| 194 |
'id' => 'type', |
'id' => 'type', |
| 195 |
'table' => 'node', |
'table' => 'node', |
| 196 |
'field' => 'type', |
'field' => 'type', |
| 197 |
'override' => array( |
'override' => array( |
| 198 |
'button' => 'Override', |
'button' => 'Override', |
| 199 |
), |
), |
| 200 |
'relationship' => 'none', |
'relationship' => 'none', |
| 201 |
), |
), |
| 202 |
'comment_count' => array( |
'comment_count' => array( |
| 203 |
'label' => 'Comment Count', |
'label' => 'Comment Count', |
| 204 |
'set_precision' => FALSE, |
'set_precision' => FALSE, |
| 205 |
'precision' => 0, |
'precision' => 0, |
| 206 |
'decimal' => '.', |
'decimal' => '.', |
| 207 |
'separator' => ',', |
'separator' => ',', |
| 208 |
'prefix' => '(', |
'prefix' => '(', |
| 209 |
'suffix' => ')', |
'suffix' => ')', |
| 210 |
'exclude' => 0, |
'exclude' => 0, |
| 211 |
'id' => 'comment_count', |
'id' => 'comment_count', |
| 212 |
'table' => 'node_comment_statistics', |
'table' => 'node_comment_statistics', |
| 213 |
'field' => 'comment_count', |
'field' => 'comment_count', |
| 214 |
'override' => array( |
'override' => array( |
| 215 |
'button' => 'Use default', |
'button' => 'Use default', |
| 216 |
), |
), |
| 217 |
'relationship' => 'none', |
'relationship' => 'none', |
| 218 |
), |
), |
| 219 |
'teaser' => array( |
'teaser' => array( |
| 220 |
'label' => '', |
'label' => '', |
| 221 |
'exclude' => 0, |
'exclude' => 0, |
| 222 |
'id' => 'teaser', |
'id' => 'teaser', |
| 223 |
'table' => 'node_revisions', |
'table' => 'node_revisions', |
| 224 |
'field' => 'teaser', |
'field' => 'teaser', |
| 225 |
'override' => array( |
'override' => array( |
| 226 |
'button' => 'Use default', |
'button' => 'Use default', |
| 227 |
), |
), |
| 228 |
'relationship' => 'none', |
'relationship' => 'none', |
| 229 |
), |
), |
| 230 |
)); |
)); |
| 231 |
$handler->override_option('items_per_page', 10); |
$handler->override_option('items_per_page', 10); |
| 232 |
$handler->override_option('use_pager', '1'); |
$handler->override_option('use_pager', '1'); |
| 233 |
$handler->override_option('path', 'topichub-detail/most-comments'); |
$handler->override_option('path', 'topichub-detail/most-comments'); |
| 234 |
$handler->override_option('menu', array( |
$handler->override_option('menu', array( |
| 235 |
'type' => 'none', |
'type' => 'none', |
| 236 |
'title' => '', |
'title' => '', |
| 237 |
'weight' => 0, |
'weight' => 0, |
| 238 |
'name' => 'navigation', |
'name' => 'navigation', |
| 239 |
)); |
)); |
| 240 |
$handler->override_option('tab_options', array( |
$handler->override_option('tab_options', array( |
| 241 |
'type' => 'none', |
'type' => 'none', |
| 242 |
'title' => '', |
'title' => '', |
| 243 |
'weight' => 0, |
'weight' => 0, |
| 244 |
)); |
)); |
| 245 |
|
|
| 246 |
return array($view->name => $view); |
return array($view->name => $view); |
| 247 |
} |
} |
| 248 |
|
|