[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/image/contrib/image_gallery/views/ -> image_gallery.views_default.inc (source)

   1  <?php
   2  // $Id: image_gallery.views_default.inc,v 1.4.2.2 2010/10/14 07:46:55 joachim Exp $
   3  
   4  /**
   5   * Implementation of hook_views_default_views().
   6   */
   7  function image_gallery_views_default_views() {
   8    /**
   9     * View of image nodes.
  10     */
  11    $view = new view;
  12    $view->name = 'image_gallery';
  13    $view->description = 'The default gallery of image nodes from Image gallery module.';
  14    $view->tag = 'image_gallery';
  15    $view->view_php = '';
  16    $view->base_table = 'node';
  17    $view->is_cacheable = FALSE;
  18    $view->api_version = 2;
  19    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  20    $handler = $view->new_display('default', 'Defaults', 'default');
  21    $handler->override_option('fields', array(
  22      'image_image' => array(
  23        'label' => '',
  24        'alter' => array(
  25          'alter_text' => 0,
  26          'text' => '',
  27          'make_link' => 0,
  28          'path' => '',
  29          'alt' => '',
  30          'prefix' => '',
  31          'suffix' => '',
  32          'help' => '',
  33          'trim' => 0,
  34          'max_length' => '',
  35          'word_boundary' => 1,
  36          'ellipsis' => 1,
  37          'html' => 0,
  38        ),
  39        'link_to_node' => 1,
  40        'image_derivative' => 'thumbnail',
  41        'exclude' => 0,
  42        'id' => 'image_image',
  43        'table' => 'node',
  44        'field' => 'image_image',
  45        'relationship' => 'none',
  46      ),
  47      'title' => array(
  48        'label' => '',
  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          'html' => 0,
  63        ),
  64        'link_to_node' => 1,
  65        'exclude' => 0,
  66        'id' => 'title',
  67        'table' => 'node',
  68        'field' => 'title',
  69        'relationship' => 'none',
  70      ),
  71    ));
  72    $handler->override_option('sorts', array(
  73      'title' => array(
  74        'id' => 'title',
  75        'table' => 'node',
  76        'field' => 'title',
  77      ),
  78      'changed' => array(
  79        'order' => 'DESC',
  80        'granularity' => 'second',
  81        'id' => 'changed',
  82        'table' => 'node',
  83        'field' => 'changed',
  84        'relationship' => 'none',
  85      ),
  86    ));
  87    $handler->override_option('arguments', array(
  88      'null' => array(
  89        'default_action' => 'default',
  90        'style_plugin' => 'default_summary',
  91        'style_options' => array(),
  92        'wildcard' => 'all',
  93        'wildcard_substitution' => 'All',
  94        'title' => '',
  95        'default_argument_type' => 'fixed',
  96        'default_argument' => '',
  97        'validate_type' => 'none',
  98        'validate_fail' => 'not found',
  99        'must_not_be' => 0,
 100        'id' => 'null',
 101        'table' => 'views',
 102        'field' => 'null',
 103        'relationship' => 'none',
 104        'default_options_div_prefix' => '',
 105        'default_argument_user' => 0,
 106        'default_argument_fixed' => 'tid',
 107        'default_argument_php' => '',
 108        'validate_argument_node_type' => array(
 109          'image' => 0,
 110          'page' => 0,
 111          'story' => 0,
 112        ),
 113        'validate_argument_node_access' => 0,
 114        'validate_argument_nid_type' => 'nid',
 115        'validate_argument_vocabulary' => array(
 116          '1' => 0,
 117        ),
 118        'validate_argument_type' => 'tid',
 119        'user_argument_type' => '',
 120        'restrict_user_roles' => 0,
 121        'user_roles' => array(),
 122        'image_size' => array(
 123          '_original' => '_original',
 124          'thumbnail' => 'thumbnail',
 125          'preview' => 'preview',
 126        ),
 127        'validate_argument_php' => '',
 128      ),
 129      'tid' => array(
 130        'default_action' => 'empty',
 131        'style_plugin' => 'default_summary',
 132        'style_options' => array(),
 133        'wildcard' => 'all',
 134        'wildcard_substitution' => 'All',
 135        'title' => '%2',
 136        'default_argument_type' => 'fixed',
 137        'default_argument' => '',
 138        'validate_type' => 'numeric',
 139        'validate_fail' => 'not found',
 140        'break_phrase' => 0,
 141        'add_table' => 0,
 142        'require_value' => 0,
 143        'reduce_duplicates' => 0,
 144        'set_breadcrumb' => 1,
 145        'id' => 'tid',
 146        'table' => 'term_node',
 147        'field' => 'tid',
 148        'relationship' => 'none',
 149        'default_options_div_prefix' => '',
 150        'default_argument_user' => 0,
 151        'default_argument_fixed' => '',
 152        'default_argument_php' => '',
 153        'validate_argument_node_type' => array(
 154          'image' => 0,
 155          'page' => 0,
 156          'story' => 0,
 157        ),
 158        'validate_argument_node_access' => 0,
 159        'validate_argument_nid_type' => 'nid',
 160        'validate_argument_vocabulary' => array(
 161          '1' => 1,
 162        ),
 163        'validate_argument_type' => 'tid',
 164        'user_argument_type' => 'uid',
 165        'restrict_user_roles' => 0,
 166        'user_roles' => array(),
 167        'image_size' => array(
 168          '_original' => '_original',
 169          'thumbnail' => 'thumbnail',
 170          'preview' => 'preview',
 171        ),
 172        'validate_argument_php' => '',
 173        'override' => array(
 174          'button' => 'Override',
 175        ),
 176      ),
 177    ));
 178    $handler->override_option('filters', array(
 179      'status' => array(
 180        'operator' => '=',
 181        'value' => '1',
 182        'group' => '0',
 183        'exposed' => FALSE,
 184        'expose' => array(
 185          'operator' => FALSE,
 186          'label' => '',
 187        ),
 188        'id' => 'status',
 189        'table' => 'node',
 190        'field' => 'status',
 191        'relationship' => 'none',
 192      ),
 193      'type' => array(
 194        'operator' => 'in',
 195        'value' => array(
 196          'image' => 'image',
 197        ),
 198        'group' => '0',
 199        'exposed' => FALSE,
 200        'expose' => array(
 201          'operator' => FALSE,
 202          'label' => '',
 203        ),
 204        'id' => 'type',
 205        'table' => 'node',
 206        'field' => 'type',
 207        'relationship' => 'none',
 208      ),
 209    ));
 210    $handler->override_option('access', array(
 211      'type' => 'none',
 212    ));
 213    $handler->override_option('cache', array(
 214      'type' => 'none',
 215    ));
 216    $handler->override_option('title', 'Image galleries');
 217    $handler->override_option('empty', 'There are no images in this gallery.');
 218    $handler->override_option('empty_format', '1');
 219    $handler->override_option('items_per_page', 12);
 220    $handler->override_option('use_pager', '1');  
 221    $handler->override_option('style_plugin', 'image_gallery');
 222    $handler->override_option('style_options', array(
 223      'grouping' => '',
 224      'type' => 'ul',
 225    ));
 226    $handler = $view->new_display('image_gallery', 'Gallery page', 'image_gallery_1');
 227    $handler->override_option('path', 'image');
 228    $handler->override_option('menu', array(
 229      'type' => 'none',
 230      'title' => '',
 231      'description' => '',
 232      'weight' => 0,
 233      'name' => 'navigation',
 234    ));
 235    $handler->override_option('tab_options', array(
 236      'type' => 'none',
 237      'title' => '',
 238      'description' => '',
 239      'weight' => 0,
 240    ));
 241    $views[$view->name] = $view;
 242  
 243    /**
 244     * View of gallery terms.
 245     */
 246    $vid = _image_gallery_get_vid();
 247     
 248    $view = new view;
 249    $view->name = 'image_gallery_terms';
 250    $view->description = 'The default list of descendant galleries from Image gallery module. Displayed within the image gallery view.';
 251    $view->tag = 'image_gallery';
 252    $view->view_php = '';
 253    $view->base_table = 'term_data';
 254    $view->is_cacheable = FALSE;
 255    $view->api_version = 2;
 256    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 257    $handler = $view->new_display('default', 'Defaults', 'default');
 258    $handler->override_option('fields', array(
 259      'image_gallery_latest_thumbnail_1' => array(
 260        'label' => '',
 261        'alter' => array(
 262          'alter_text' => 0,
 263          'text' => '',
 264          'make_link' => 0,
 265          'path' => '',
 266          'alt' => '',
 267          'prefix' => '',
 268          'suffix' => '',
 269          'help' => '',
 270          'trim' => 0,
 271          'max_length' => '',
 272          'word_boundary' => 1,
 273          'ellipsis' => 1,
 274          'html' => 0,
 275        ),
 276        'link_to_taxonomy' => 1,
 277        'depth' => 'all',
 278        'descendants' => 'flat',
 279        'image_derivative' => 'thumbnail',
 280        'exclude' => 0,
 281        'id' => 'image_gallery_latest_thumbnail_1',
 282        'table' => 'term_data',
 283        'field' => 'image_gallery_latest_thumbnail',
 284        'relationship' => 'none',
 285      ),
 286      'name' => array(
 287        'label' => '',
 288        'alter' => array(
 289          'alter_text' => 0,
 290          'text' => '<h3>[name]</h3>',
 291          'make_link' => 0,
 292          'path' => '',
 293          'link_class' => '',
 294          'alt' => '',
 295          'prefix' => '',
 296          'suffix' => '',
 297          'target' => '',
 298          'help' => '',
 299          'trim' => 0,
 300          'max_length' => '',
 301          'word_boundary' => 1,
 302          'ellipsis' => 1,
 303          'html' => 0,
 304          'strip_tags' => 0,
 305        ),
 306        'empty' => '',
 307        'hide_empty' => 0,
 308        'empty_zero' => 0,
 309        'link_to_taxonomy' => 1,
 310        'exclude' => 0,
 311        'id' => 'name',
 312        'table' => 'term_data',
 313        'field' => 'name',
 314        'relationship' => 'none',
 315      ),
 316      'image_gallery_count' => array(
 317        'label' => '',
 318        'alter' => array(
 319          'alter_text' => 0,
 320          'text' => '',
 321          'make_link' => 0,
 322          'path' => '',
 323          'alt' => '',
 324          'prefix' => '',
 325          'suffix' => '',
 326          'help' => '',
 327          'trim' => 0,
 328          'max_length' => '',
 329          'word_boundary' => 1,
 330          'ellipsis' => 1,
 331          'html' => 0,
 332        ),
 333        'link_to_taxonomy' => 0,
 334        'exclude' => 0,
 335        'id' => 'image_gallery_count',
 336        'table' => 'term_data',
 337        'field' => 'image_gallery_count',
 338        'relationship' => 'none',
 339      ),
 340      'image_gallery_latest_time' => array(
 341        'label' => 'Last updated',
 342        'alter' => array(
 343          'alter_text' => 0,
 344          'text' => '',
 345          'make_link' => 0,
 346          'path' => '',
 347          'alt' => '',
 348          'prefix' => '',
 349          'suffix' => '',
 350          'help' => '',
 351          'trim' => 0,
 352          'max_length' => '',
 353          'word_boundary' => 1,
 354          'ellipsis' => 1,
 355          'html' => 0,
 356        ),
 357        'link_to_taxonomy' => 0,
 358        'depth' => 'all',
 359        'descendants' => 'flat',
 360        'exclude' => 0,
 361        'id' => 'image_gallery_latest_time',
 362        'table' => 'term_data',
 363        'field' => 'image_gallery_latest_time',
 364        'relationship' => 'none',
 365      ),
 366      'description' => array(
 367        'label' => 'Term description',
 368        'alter' => array(
 369          'alter_text' => 0,
 370          'text' => '',
 371          'make_link' => 0,
 372          'path' => '',
 373          'link_class' => '',
 374          'alt' => '',
 375          'prefix' => '',
 376          'suffix' => '',
 377          'target' => '',
 378          'help' => '',
 379          'trim' => 0,
 380          'max_length' => '',
 381          'word_boundary' => 1,
 382          'ellipsis' => 1,
 383          'html' => 0,
 384          'strip_tags' => 0,
 385        ),
 386        'empty' => '',
 387        'hide_empty' => 0,
 388        'empty_zero' => 0,
 389        'exclude' => 0,
 390        'id' => 'description',
 391        'table' => 'term_data',
 392        'field' => 'description',
 393        'relationship' => 'none',
 394      ),
 395    ));
 396    $handler->override_option('sorts', array(
 397      'weight' => array(
 398        'order' => 'ASC',
 399        'id' => 'weight',
 400        'table' => 'term_data',
 401        'field' => 'weight',
 402        'relationship' => 'none',
 403      ),
 404    ));
 405    $handler->override_option('arguments', array(
 406      'parent' => array(
 407        'default_action' => 'ignore',
 408        'style_plugin' => 'default_summary',
 409        'style_options' => array(),
 410        'wildcard' => 'all',
 411        'wildcard_substitution' => 'All',
 412        'title' => '',
 413        'default_argument_type' => 'fixed',
 414        'default_argument' => '',
 415        'validate_type' => 'none',
 416        'validate_fail' => 'not found',
 417        'break_phrase' => 0,
 418        'not' => 0,
 419        'id' => 'parent',
 420        'table' => 'term_hierarchy',
 421        'field' => 'parent',
 422        'relationship' => 'none',
 423        'default_options_div_prefix' => '',
 424        'default_argument_user' => 0,
 425        'default_argument_fixed' => '',
 426        'default_argument_php' => '',
 427        'validate_argument_node_type' => array(
 428          'image' => 0,
 429          'page' => 0,
 430          'story' => 0,
 431        ),
 432        'validate_argument_node_access' => 0,
 433        'validate_argument_nid_type' => 'nid',
 434        'validate_argument_vocabulary' => array(
 435          '1' => 1,
 436        ),
 437        'validate_argument_type' => 'tid',
 438        'user_argument_type' => 'uid',
 439        'restrict_user_roles' => 0,
 440        'user_roles' => array(),
 441        'image_size' => array(
 442          '_original' => '_original',
 443          'thumbnail' => 'thumbnail',
 444          'preview' => 'preview',
 445        ),
 446        'validate_argument_php' => '',
 447      ),
 448    ));
 449    $handler->override_option('filters', array(
 450      'vid' => array(
 451        'operator' => 'in',
 452        'value' => array(
 453          $vid => $vid,
 454        ),
 455        'group' => '0',
 456        'exposed' => FALSE,
 457        'expose' => array(
 458          'operator' => FALSE,
 459          'label' => '',
 460        ),
 461        'id' => 'vid',
 462        'table' => 'term_data',
 463        'field' => 'vid',
 464        'relationship' => 'none',
 465      ),
 466    ));
 467    $handler->override_option('access', array(
 468      'type' => 'none',
 469    ));
 470    $handler->override_option('cache', array(
 471      'type' => 'none',
 472    ));
 473    $handler->override_option('items_per_page', 0);
 474    $handler->override_option('style_plugin', 'image_gallery_terms');
 475    $handler->override_option('style_options', array(
 476      'grouping' => '',
 477      'type' => 'ul',
 478    ));
 479    $handler->override_option('row_options', array(
 480      'inline' => array(),
 481      'separator' => '',
 482      'hide_empty' => 0,
 483    ));
 484    $views[$view->name] = $view;
 485  
 486    return $views;
 487  }
 488  
 489  
 490  


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7