| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 3 // $Id: station_playlist.views_default.inc,v 1.7 2009/09/20 16:42:31 drewish Exp $ 4 5 /** 6 * Implementation of hook_views_default_views(). 7 */ 8 function station_playlist_views_default_views() { 9 /* 10 * View 'station_playlist_tracks' 11 */ 12 $view = new view; 13 $view->name = 'station_playlist_tracks'; 14 $view->description = 'Listing of tracks on a playlist node.'; 15 $view->tag = 'station_playlist'; 16 $view->view_php = ''; 17 $view->base_table = 'node'; 18 $view->is_cacheable = FALSE; 19 $view->api_version = 2; 20 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 21 $handler = $view->new_display('default', 'Defaults', 'default'); 22 $handler->override_option('fields', array( 23 'artist' => array( 24 'label' => 'Artist', 25 'alter' => array( 26 'alter_text' => 0, 27 'text' => '', 28 'make_link' => 0, 29 'path' => '', 30 'alt' => '', 31 'prefix' => '', 32 'suffix' => '', 33 'help' => '', 34 'trim' => 0, 35 'max_length' => '', 36 'word_boundary' => 1, 37 'ellipsis' => 1, 38 'strip_tags' => 0, 39 'html' => 0, 40 ), 41 'exclude' => 0, 42 'id' => 'artist', 43 'table' => 'station_playlist_track', 44 'field' => 'artist', 45 'relationship' => 'none', 46 ), 47 'title' => array( 48 'label' => 'Title', 49 'alter' => array( 50 'alter_text' => 0, 51 'text' => '', 52 'make_link' => 0, 53 'path' => '', 54 'alt' => '', 55 'prefix' => '', 56 'suffix' => '', 57 'help' => '', 58 'trim' => 0, 59 'max_length' => '', 60 'word_boundary' => 1, 61 'ellipsis' => 1, 62 'strip_tags' => 0, 63 'html' => 0, 64 ), 65 'exclude' => 0, 66 'id' => 'title', 67 'table' => 'station_playlist_track', 68 'field' => 'title', 69 'relationship' => 'none', 70 ), 71 'album' => array( 72 'label' => 'Album', 73 'alter' => array( 74 'alter_text' => 0, 75 'text' => '', 76 'make_link' => 0, 77 'path' => '', 78 'alt' => '', 79 'prefix' => '', 80 'suffix' => '', 81 'help' => '', 82 'trim' => 0, 83 'max_length' => '', 84 'word_boundary' => 1, 85 'ellipsis' => 1, 86 'strip_tags' => 0, 87 'html' => 0, 88 ), 89 'exclude' => 0, 90 'id' => 'album', 91 'table' => 'station_playlist_track', 92 'field' => 'album', 93 'relationship' => 'none', 94 ), 95 'label' => array( 96 'label' => 'Label', 97 'alter' => array( 98 'alter_text' => 0, 99 'text' => '', 100 'make_link' => 0, 101 'path' => '', 102 'alt' => '', 103 'prefix' => '', 104 'suffix' => '', 105 'help' => '', 106 'trim' => 0, 107 'max_length' => '', 108 'word_boundary' => 1, 109 'ellipsis' => 1, 110 'strip_tags' => 0, 111 'html' => 0, 112 ), 113 'exclude' => 0, 114 'id' => 'label', 115 'table' => 'station_playlist_track', 116 'field' => 'label', 117 'relationship' => 'none', 118 ), 119 'link' => array( 120 'label' => 'Link', 121 'alter' => array( 122 'alter_text' => 0, 123 'text' => '', 124 'make_link' => 0, 125 'path' => '', 126 'alt' => '', 127 'prefix' => '', 128 'suffix' => '', 129 'help' => '', 130 'trim' => 0, 131 'max_length' => '', 132 'word_boundary' => 1, 133 'ellipsis' => 1, 134 'strip_tags' => 0, 135 'html' => 0, 136 ), 137 'exclude' => 0, 138 'id' => 'link', 139 'table' => 'station_playlist_track', 140 'field' => 'link', 141 'relationship' => 'none', 142 ), 143 )); 144 $handler->override_option('sorts', array( 145 'weight' => array( 146 'order' => 'ASC', 147 'id' => 'weight', 148 'table' => 'station_playlist_track', 149 'field' => 'weight', 150 'relationship' => 'none', 151 ), 152 )); 153 $handler->override_option('arguments', array( 154 'nid' => array( 155 'default_action' => 'summary asc', 156 'style_plugin' => 'default_summary', 157 'style_options' => array( 158 'count' => 1, 159 'override' => 0, 160 'items_per_page' => '25', 161 ), 162 'wildcard' => 'all', 163 'wildcard_substitution' => 'All', 164 'title' => '', 165 'default_argument_type' => 'node', 166 'default_argument' => '', 167 'validate_type' => 'node', 168 'validate_fail' => 'not found', 169 'break_phrase' => 0, 170 'not' => 0, 171 'id' => 'nid', 172 'table' => 'node', 173 'field' => 'nid', 174 'validate_user_argument_type' => 'uid', 175 'validate_user_roles' => array( 176 '2' => 0, 177 ), 178 'relationship' => 'none', 179 'default_options_div_prefix' => '', 180 'default_argument_user' => 0, 181 'default_argument_fixed' => '', 182 'default_argument_php' => '', 183 'validate_argument_node_type' => array( 184 'station_playlist' => 'station_playlist', 185 'station_program' => 0, 186 'station_schedule' => 0, 187 'page' => 0, 188 'story' => 0, 189 ), 190 'validate_argument_node_access' => 1, 191 'validate_argument_nid_type' => 'nid', 192 'validate_argument_vocabulary' => array(), 193 'validate_argument_type' => 'tid', 194 'validate_argument_transform' => 0, 195 'validate_user_restrict_roles' => 0, 196 'validate_argument_php' => '', 197 ), 198 )); 199 $handler->override_option('filters', array( 200 'type' => array( 201 'operator' => 'in', 202 'value' => array( 203 'station_playlist' => 'station_playlist', 204 ), 205 'group' => '0', 206 'exposed' => FALSE, 207 'expose' => array( 208 'operator' => FALSE, 209 'label' => '', 210 ), 211 'id' => 'type', 212 'table' => 'node', 213 'field' => 'type', 214 'relationship' => 'none', 215 ), 216 )); 217 $handler->override_option('access', array( 218 'type' => 'perm', 219 'perm' => 'view station playlist content', 220 )); 221 $handler->override_option('items_per_page', 0); 222 $handler->override_option('style_plugin', 'table'); 223 $views[$view->name] = $view; 224 225 /* 226 * View 'station_program_playlists' 227 */ 228 $view = new view; 229 $view->name = 'station_program_playlists'; 230 $view->description = 'Station Program\'s associated Playlists'; 231 $view->tag = 'station_playlist'; 232 $view->view_php = ''; 233 $view->base_table = 'node'; 234 $view->is_cacheable = FALSE; 235 $view->api_version = 2; 236 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 237 $handler = $view->new_display('default', 'Defaults', 'default'); 238 $handler->override_option('fields', array( 239 'field_station_playlist_date_value' => array( 240 'label' => '', 241 'link_to_node' => 1, 242 'label_type' => 'none', 243 'format' => 'default', 244 'multiple' => array( 245 'group' => TRUE, 246 'multiple_number' => '', 247 'multiple_from' => '', 248 'multiple_reversed' => FALSE, 249 ), 250 'exclude' => 0, 251 'id' => 'field_station_playlist_date_value', 252 'table' => 'node_data_field_station_playlist_date', 253 'field' => 'field_station_playlist_date_value', 254 'relationship' => 'field_station_program_nid', 255 ), 256 )); 257 $handler->override_option('sorts', array( 258 'field_station_playlist_date_value' => array( 259 'order' => 'DESC', 260 'delta' => -1, 261 'id' => 'field_station_playlist_date_value', 262 'table' => 'node_data_field_station_playlist_date', 263 'field' => 'field_station_playlist_date_value', 264 'relationship' => 'none', 265 ), 266 )); 267 $handler->override_option('arguments', array( 268 'field_station_program_nid' => array( 269 'default_action' => 'default', 270 'style_plugin' => 'default_summary', 271 'style_options' => array(), 272 'wildcard' => 'all', 273 'wildcard_substitution' => 'All', 274 'title' => '%1 Playlists', 275 'default_argument_type' => 'node', 276 'default_argument' => '', 277 'validate_type' => 'node', 278 'validate_fail' => 'not found', 279 'break_phrase' => 0, 280 'not' => 0, 281 'id' => 'field_station_program_nid', 282 'table' => 'node_data_field_station_program', 283 'field' => 'field_station_program_nid', 284 'relationship' => 'none', 285 'default_options_div_prefix' => '', 286 'default_argument_user' => 0, 287 'default_argument_fixed' => '', 288 'default_argument_php' => '', 289 'validate_argument_node_type' => array( 290 'station_program' => 'station_program', 291 'blog' => 0, 292 'poll' => 0, 293 'audio' => 0, 294 'image' => 0, 295 'station_album' => 0, 296 'station_playlist' => 0, 297 'book' => 0, 298 'job' => 0, 299 'page' => 0, 300 'story' => 0, 301 'video' => 0, 302 ), 303 'validate_argument_node_access' => 1, 304 'validate_argument_nid_type' => 'nid', 305 'validate_argument_vocabulary' => array( 306 '1' => 0, 307 ), 308 'validate_argument_type' => 'tid', 309 'validate_argument_php' => '', 310 'override' => array( 311 'button' => 'Override', 312 ), 313 ), 314 )); 315 $handler->override_option('filters', array( 316 'type' => array( 317 'operator' => 'in', 318 'value' => array( 319 'station_playlist' => 'station_playlist', 320 ), 321 'group' => '0', 322 'exposed' => FALSE, 323 'expose' => array( 324 'operator' => FALSE, 325 'label' => '', 326 ), 327 'id' => 'type', 328 'table' => 'node', 329 'field' => 'type', 330 'relationship' => 'none', 331 ), 332 'status_extra' => array( 333 'id' => 'status_extra', 334 'table' => 'node', 335 'field' => 'status_extra', 336 ), 337 'date_filter' => array( 338 'operator' => '<=', 339 'value' => array( 340 'min' => NULL, 341 'max' => NULL, 342 'value' => NULL, 343 'default_date' => 'now', 344 'default_to_date' => '', 345 ), 346 'group' => '0', 347 'exposed' => FALSE, 348 'expose' => array( 349 'operator' => FALSE, 350 'label' => '', 351 ), 352 'date_fields' => array( 353 'node_data_field_station_playlist_date.field_station_playlist_date_value' => 'node_data_field_station_playlist_date.field_station_playlist_date_value', 354 ), 355 'granularity' => 'hour', 356 'form_type' => 'date_select', 357 'default_date' => 'now', 358 'default_to_date' => '', 359 'id' => 'date_filter', 360 'table' => 'node', 361 'field' => 'date_filter', 362 'relationship' => 'none', 363 ), 364 )); 365 $handler->override_option('access', array( 366 'type' => 'perm', 367 'perm' => 'view station playlist content', 368 )); 369 $handler->override_option('title', 'Playlists'); 370 $handler->override_option('use_pager', '1'); 371 $handler->override_option('use_more', 0); 372 $handler->override_option('style_plugin', 'list'); 373 $handler->override_option('style_options', array( 374 'type' => 'ul', 375 )); 376 $handler->override_option('row_plugin', 'node'); 377 $handler->override_option('row_options', array( 378 'teaser' => 1, 379 'links' => 1, 380 'comments' => 0, 381 )); 382 $handler = $view->new_display('block', 'Future', 'block_1'); 383 $handler->override_option('filters', array( 384 'type' => array( 385 'operator' => 'in', 386 'value' => array( 387 'station_playlist' => 'station_playlist', 388 ), 389 'group' => '0', 390 'exposed' => FALSE, 391 'expose' => array( 392 'operator' => FALSE, 393 'label' => '', 394 ), 395 'id' => 'type', 396 'table' => 'node', 397 'field' => 'type', 398 'relationship' => 'none', 399 ), 400 'status_extra' => array( 401 'id' => 'status_extra', 402 'table' => 'node', 403 'field' => 'status_extra', 404 ), 405 'date_filter' => array( 406 'operator' => '>', 407 'value' => array( 408 'value' => NULL, 409 'min' => NULL, 410 'max' => NULL, 411 'default_date' => 'now', 412 'default_to_date' => '', 413 ), 414 'group' => '0', 415 'exposed' => FALSE, 416 'expose' => array( 417 'operator' => FALSE, 418 'label' => '', 419 ), 420 'date_fields' => array( 421 'node_data_field_station_playlist_date.field_station_playlist_date_value' => 'node_data_field_station_playlist_date.field_station_playlist_date_value', 422 ), 423 'granularity' => 'hour', 424 'form_type' => 'date_select', 425 'default_date' => 'now', 426 'default_to_date' => '', 427 'id' => 'date_filter', 428 'table' => 'node', 429 'field' => 'date_filter', 430 'override' => array( 431 'button' => 'Use default', 432 ), 433 'relationship' => 'none', 434 ), 435 )); 436 $handler->override_option('title', 'Upcoming shows'); 437 $handler->override_option('items_per_page', 0); 438 $handler->override_option('use_pager', FALSE); 439 $handler->override_option('row_plugin', 'fields'); 440 $handler->override_option('row_options', array()); 441 $handler->override_option('block_description', 'Program\'s upcoming playlists'); 442 $handler->override_option('block_caching', -1); 443 $handler = $view->new_display('block', 'Past', 'block_2'); 444 $handler->override_option('title', 'Previous shows'); 445 $handler->override_option('use_more', 1); 446 $handler->override_option('row_plugin', 'fields'); 447 $handler->override_option('row_options', array()); 448 $handler->override_option('block_description', 'Program\'s previous playlists'); 449 $handler->override_option('block_caching', -1); 450 $handler = $view->new_display('page', 'Page', 'page_1'); 451 $handler->override_option('arguments', array( 452 'field_station_program_nid' => array( 453 'default_action' => 'ignore', 454 'style_plugin' => 'default_summary', 455 'style_options' => array(), 456 'wildcard' => 'all', 457 'wildcard_substitution' => 'All', 458 'title' => '%1 Playlists', 459 'default_argument_type' => 'node', 460 'default_argument' => '', 461 'validate_type' => 'node', 462 'validate_fail' => 'not found', 463 'break_phrase' => 0, 464 'not' => 0, 465 'id' => 'field_station_program_nid', 466 'table' => 'node_data_field_station_program', 467 'field' => 'field_station_program_nid', 468 'relationship' => 'none', 469 'default_options_div_prefix' => '', 470 'default_argument_user' => 0, 471 'default_argument_fixed' => '', 472 'default_argument_php' => '', 473 'validate_argument_node_type' => array( 474 'station_program' => 'station_program', 475 'blog' => 0, 476 'poll' => 0, 477 'audio' => 0, 478 'image' => 0, 479 'station_album' => 0, 480 'station_playlist' => 0, 481 'station_schedule' => 0, 482 'book' => 0, 483 'location' => 0, 484 'page' => 0, 485 'story' => 0, 486 'video' => 0, 487 ), 488 'validate_argument_node_access' => 1, 489 'validate_argument_nid_type' => 'nid', 490 'validate_argument_vocabulary' => array( 491 '1' => 0, 492 '2' => 0, 493 '4' => 0, 494 '5' => 0, 495 '3' => 0, 496 ), 497 'validate_argument_type' => 'tid', 498 'validate_argument_php' => '', 499 'override' => array( 500 'button' => 'Use default', 501 ), 502 'image_size' => array( 503 '_original' => '_original', 504 'thumbnail' => 'thumbnail', 505 'preview' => 'preview', 506 ), 507 ), 508 )); 509 $handler->override_option('style_plugin', 'default'); 510 $handler->override_option('style_options', NULL); 511 $handler->override_option('path', 'station/playlists'); 512 $handler->override_option('menu', array( 513 'type' => 'normal', 514 'title' => 'Playlists', 515 'description' => '', 516 'weight' => '0', 517 'name' => 'navigation', 518 )); 519 $handler->override_option('tab_options', array( 520 'type' => 'none', 521 'title' => '', 522 'description' => '', 523 'weight' => 0, 524 )); 525 $views[$view->name] = $view; 526 527 return $views; 528 } 529 530
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |