search.views_default.inc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. /**
  3. * @file
  4. * Bulk export of views_default objects generated by Bulk export module.
  5. */
  6. /**
  7. * Implementation of hook_views_default_views()
  8. */
  9. function search_views_default_views() {
  10. $views = array();
  11. $view = new view;
  12. $view->name = 'backlinks';
  13. $view->description = 'Displays a list of nodes that link to the node, using the search backlinks table.';
  14. $view->tag = 'default';
  15. $view->base_table = 'node';
  16. $view->human_name = 'Backlinks';
  17. $view->core = 0;
  18. $view->api_version = '3.0';
  19. $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
  20. /* Display: Master */
  21. $handler = $view->new_display('default', 'Master', 'default');
  22. $handler->display->display_options['access']['type'] = 'none';
  23. $handler->display->display_options['cache']['type'] = 'none';
  24. $handler->display->display_options['query']['type'] = 'views_query';
  25. $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  26. $handler->display->display_options['exposed_form']['type'] = 'basic';
  27. $handler->display->display_options['pager']['type'] = 'full';
  28. $handler->display->display_options['pager']['options']['items_per_page'] = 30;
  29. $handler->display->display_options['style_plugin'] = 'list';
  30. $handler->display->display_options['style_options']['type'] = 'ol';
  31. $handler->display->display_options['row_plugin'] = 'fields';
  32. /* No results behavior: Global: Text area */
  33. $handler->display->display_options['empty']['text']['id'] = 'area';
  34. $handler->display->display_options['empty']['text']['table'] = 'views';
  35. $handler->display->display_options['empty']['text']['field'] = 'area';
  36. $handler->display->display_options['empty']['text']['empty'] = FALSE;
  37. $handler->display->display_options['empty']['text']['content'] = 'No backlinks found.';
  38. $handler->display->display_options['empty']['text']['format'] = '1';
  39. /* Field: Content: Title */
  40. $handler->display->display_options['fields']['title']['id'] = 'title';
  41. $handler->display->display_options['fields']['title']['table'] = 'node';
  42. $handler->display->display_options['fields']['title']['field'] = 'title';
  43. $handler->display->display_options['fields']['title']['label'] = '';
  44. $handler->display->display_options['fields']['title']['link_to_node'] = 1;
  45. /* Contextual filter: Search: Links to */
  46. $handler->display->display_options['arguments']['nid']['id'] = 'nid';
  47. $handler->display->display_options['arguments']['nid']['table'] = 'search_node_links_to';
  48. $handler->display->display_options['arguments']['nid']['field'] = 'nid';
  49. $handler->display->display_options['arguments']['nid']['default_action'] = 'not found';
  50. $handler->display->display_options['arguments']['nid']['title_enable'] = 1;
  51. $handler->display->display_options['arguments']['nid']['title'] = 'Pages that link to %1';
  52. $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
  53. $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
  54. $handler->display->display_options['arguments']['nid']['specify_validation'] = 1;
  55. $handler->display->display_options['arguments']['nid']['validate']['type'] = 'node';
  56. /* Filter criterion: Content: Published */
  57. $handler->display->display_options['filters']['status']['id'] = 'status';
  58. $handler->display->display_options['filters']['status']['table'] = 'node';
  59. $handler->display->display_options['filters']['status']['field'] = 'status';
  60. $handler->display->display_options['filters']['status']['value'] = 1;
  61. $handler->display->display_options['filters']['status']['group'] = 0;
  62. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  63. /* Display: Page */
  64. $handler = $view->new_display('page', 'Page', 'page');
  65. $handler->display->display_options['path'] = 'node/%/backlinks';
  66. $handler->display->display_options['menu']['type'] = 'tab';
  67. $handler->display->display_options['menu']['title'] = 'What links here';
  68. $handler->display->display_options['menu']['weight'] = '0';
  69. /* Display: What links here */
  70. $handler = $view->new_display('block', 'What links here', 'block');
  71. $handler->display->display_options['defaults']['use_more'] = FALSE;
  72. $handler->display->display_options['use_more'] = TRUE;
  73. $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  74. $handler->display->display_options['style_plugin'] = 'list';
  75. $handler->display->display_options['defaults']['style_options'] = FALSE;
  76. $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  77. $handler->display->display_options['row_plugin'] = 'fields';
  78. $handler->display->display_options['defaults']['row_options'] = FALSE;
  79. $handler->display->display_options['defaults']['arguments'] = FALSE;
  80. /* Contextual filter: Search: Links to */
  81. $handler->display->display_options['arguments']['nid']['id'] = 'nid';
  82. $handler->display->display_options['arguments']['nid']['table'] = 'search_node_links_to';
  83. $handler->display->display_options['arguments']['nid']['field'] = 'nid';
  84. $handler->display->display_options['arguments']['nid']['default_action'] = 'default';
  85. $handler->display->display_options['arguments']['nid']['title_enable'] = 1;
  86. $handler->display->display_options['arguments']['nid']['title'] = 'What links here';
  87. $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
  88. $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
  89. $handler->display->display_options['arguments']['nid']['specify_validation'] = 1;
  90. $handler->display->display_options['arguments']['nid']['validate']['type'] = 'node';
  91. $translatables['backlinks'] = array(
  92. t('Master'),
  93. t('more'),
  94. t('Apply'),
  95. t('Reset'),
  96. t('Sort by'),
  97. t('Asc'),
  98. t('Desc'),
  99. t('Items per page'),
  100. t('- All -'),
  101. t('Offset'),
  102. t('No backlinks found.'),
  103. t('All'),
  104. t('Pages that link to %1'),
  105. t('Page'),
  106. t('What links here'),
  107. );
  108. $views['backlinks'] = $view;
  109. return $views;
  110. }