page_title.views_default.inc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. /**
  3. * @file
  4. * Default Page Title Views
  5. */
  6. /**
  7. * Implementation hook_views_default_views().
  8. */
  9. function page_title_views_default_views() {
  10. // This lets us locally cache the result - in case the function is called twice
  11. static $views;
  12. if (isset($views)) {
  13. return $views;
  14. }
  15. // No views cached, generate the default views array and return
  16. $views = array();
  17. $views += _page_title_views_default_views_list_node_page_titles();
  18. return $views;
  19. }
  20. /**
  21. * Local "internal" function as a wrapper aroudn the list_page_titles view
  22. */
  23. function _page_title_views_default_views_list_node_page_titles() {
  24. $view = new view;
  25. $view->name = 'list_node_page_titles';
  26. $view->description = 'List all Nodes with their Page Titles';
  27. $view->tag = '';
  28. $view->base_table = 'node';
  29. $view->human_name = 'List Node Page Titles';
  30. $view->core = 7;
  31. $view->api_version = '3.0-alpha1';
  32. $view->disabled = FALSE;
  33. /* Display: Defaults */
  34. $handler = $view->new_display('default', 'Defaults', 'default');
  35. $handler->display->display_options['title'] = 'Page Title List';
  36. $handler->display->display_options['use_ajax'] = FALSE;
  37. $handler->display->display_options['access']['type'] = 'perm';
  38. $handler->display->display_options['access']['perm'] = 'administer page titles';
  39. $handler->display->display_options['cache']['type'] = 'none';
  40. $handler->display->display_options['query']['type'] = 'views_query';
  41. $handler->display->display_options['exposed_form']['type'] = 'basic';
  42. $handler->display->display_options['pager']['type'] = 'full';
  43. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  44. $handler->display->display_options['pager']['options']['offset'] = '0';
  45. $handler->display->display_options['pager']['options']['id'] = '0';
  46. $handler->display->display_options['pager']['options']['expose']['items_per_page'] = TRUE;
  47. $handler->display->display_options['pager']['options']['expose']['items_per_page_options'] = '5, 10, 25, 50';
  48. $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 1;
  49. $handler->display->display_options['style_plugin'] = 'table';
  50. $handler->display->display_options['style_options']['columns'] = array(
  51. 'nid' => 'nid',
  52. 'title' => 'title',
  53. 'edit_node' => 'edit_node',
  54. );
  55. $handler->display->display_options['style_options']['default'] = 'nid';
  56. $handler->display->display_options['style_options']['info'] = array(
  57. 'nid' => array(
  58. 'sortable' => 1,
  59. 'default_sort_order' => 'desc',
  60. 'align' => '',
  61. 'separator' => '',
  62. ),
  63. 'title' => array(
  64. 'sortable' => 1,
  65. 'default_sort_order' => 'asc',
  66. 'align' => '',
  67. 'separator' => '',
  68. ),
  69. 'page_title' => array(
  70. 'sortable' => 1,
  71. 'default_sort_order' => 'asc',
  72. 'align' => '',
  73. 'separator' => '',
  74. ),
  75. 'edit_node' => array(
  76. 'align' => '',
  77. 'separator' => '',
  78. ),
  79. );
  80. $handler->display->display_options['style_options']['override'] = 1;
  81. $handler->display->display_options['style_options']['sticky'] = 0;
  82. $handler->display->display_options['style_options']['order'] = 'desc';
  83. /* Header: Header Text */
  84. $handler->display->display_options['header']['area']['id'] = 'area';
  85. $handler->display->display_options['header']['area']['table'] = 'views';
  86. $handler->display->display_options['header']['area']['field'] = 'area';
  87. $handler->display->display_options['header']['area']['ui_name'] = 'Header Text';
  88. $handler->display->display_options['header']['area']['empty'] = FALSE;
  89. $handler->display->display_options['header']['area']['content'] = 'Listed below are all the nodes on the site with their Page Title (if set).';
  90. /* Empty text: Empty Text */
  91. $handler->display->display_options['empty']['area']['id'] = 'area';
  92. $handler->display->display_options['empty']['area']['table'] = 'views';
  93. $handler->display->display_options['empty']['area']['field'] = 'area';
  94. $handler->display->display_options['empty']['area']['ui_name'] = 'Empty Text';
  95. $handler->display->display_options['empty']['area']['empty'] = FALSE;
  96. $handler->display->display_options['empty']['area']['content'] = 'There is no content to list.';
  97. /* Field: Node: Nid */
  98. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  99. $handler->display->display_options['fields']['nid']['table'] = 'node';
  100. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  101. /* Field: Node: Title */
  102. $handler->display->display_options['fields']['title']['id'] = 'title';
  103. $handler->display->display_options['fields']['title']['table'] = 'node';
  104. $handler->display->display_options['fields']['title']['field'] = 'title';
  105. $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
  106. $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
  107. $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
  108. $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
  109. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
  110. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
  111. $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
  112. $handler->display->display_options['fields']['title']['alter']['html'] = 0;
  113. $handler->display->display_options['fields']['title']['element_label_colon'] = 1;
  114. $handler->display->display_options['fields']['title']['element_default_classes'] = 1;
  115. $handler->display->display_options['fields']['title']['hide_empty'] = 0;
  116. $handler->display->display_options['fields']['title']['empty_zero'] = 0;
  117. $handler->display->display_options['fields']['title']['link_to_node'] = 1;
  118. /* Field: Page Title: Title */
  119. $handler->display->display_options['fields']['page_title']['id'] = 'page_title';
  120. $handler->display->display_options['fields']['page_title']['table'] = 'page_title';
  121. $handler->display->display_options['fields']['page_title']['field'] = 'page_title';
  122. $handler->display->display_options['fields']['page_title']['alter']['alter_text'] = 0;
  123. $handler->display->display_options['fields']['page_title']['alter']['make_link'] = 0;
  124. $handler->display->display_options['fields']['page_title']['alter']['absolute'] = 0;
  125. $handler->display->display_options['fields']['page_title']['alter']['trim'] = 0;
  126. $handler->display->display_options['fields']['page_title']['alter']['word_boundary'] = 1;
  127. $handler->display->display_options['fields']['page_title']['alter']['ellipsis'] = 1;
  128. $handler->display->display_options['fields']['page_title']['alter']['strip_tags'] = 0;
  129. $handler->display->display_options['fields']['page_title']['alter']['html'] = 0;
  130. $handler->display->display_options['fields']['page_title']['element_label_colon'] = 1;
  131. $handler->display->display_options['fields']['page_title']['element_default_classes'] = 1;
  132. $handler->display->display_options['fields']['page_title']['hide_empty'] = 0;
  133. $handler->display->display_options['fields']['page_title']['empty_zero'] = 0;
  134. $handler->display->display_options['fields']['page_title']['link_to_node'] = 0;
  135. $handler->display->display_options['fields']['page_title']['use_node_title'] = 0;
  136. /* Field: Node: Edit link */
  137. $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
  138. $handler->display->display_options['fields']['edit_node']['table'] = 'node';
  139. $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
  140. /* Filter: Node: Nid */
  141. $handler->display->display_options['filters']['nid']['id'] = 'nid';
  142. $handler->display->display_options['filters']['nid']['table'] = 'node';
  143. $handler->display->display_options['filters']['nid']['field'] = 'nid';
  144. $handler->display->display_options['filters']['nid']['exposed'] = TRUE;
  145. $handler->display->display_options['filters']['nid']['expose']['use_operator'] = FALSE;
  146. $handler->display->display_options['filters']['nid']['expose']['label'] = 'Node ID (NID) is:';
  147. $handler->display->display_options['filters']['nid']['expose']['identifier'] = 'nid';
  148. $handler->display->display_options['filters']['nid']['expose']['single'] = TRUE;
  149. /* Filter: Node: Title */
  150. $handler->display->display_options['filters']['title']['id'] = 'title';
  151. $handler->display->display_options['filters']['title']['table'] = 'node';
  152. $handler->display->display_options['filters']['title']['field'] = 'title';
  153. $handler->display->display_options['filters']['title']['operator'] = 'contains';
  154. $handler->display->display_options['filters']['title']['exposed'] = TRUE;
  155. $handler->display->display_options['filters']['title']['expose']['use_operator'] = FALSE;
  156. $handler->display->display_options['filters']['title']['expose']['label'] = 'Title Contains:';
  157. $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
  158. $handler->display->display_options['filters']['title']['expose']['single'] = TRUE;
  159. /* Filter: Page Title: Title */
  160. $handler->display->display_options['filters']['page_title']['id'] = 'page_title';
  161. $handler->display->display_options['filters']['page_title']['table'] = 'page_title';
  162. $handler->display->display_options['filters']['page_title']['field'] = 'page_title';
  163. $handler->display->display_options['filters']['page_title']['operator'] = 'contains';
  164. $handler->display->display_options['filters']['page_title']['exposed'] = TRUE;
  165. $handler->display->display_options['filters']['page_title']['expose']['use_operator'] = FALSE;
  166. $handler->display->display_options['filters']['page_title']['expose']['label'] = '"Page Title" Contains:';
  167. $handler->display->display_options['filters']['page_title']['expose']['identifier'] = 'page_title';
  168. $handler->display->display_options['filters']['page_title']['expose']['single'] = TRUE;
  169. /* Display: Page */
  170. $handler = $view->new_display('page', 'Page', 'page_1');
  171. $handler->display->display_options['path'] = 'admin/reports/page-title';
  172. $handler->display->display_options['menu']['type'] = 'normal';
  173. $handler->display->display_options['menu']['title'] = 'Page Title List';
  174. $handler->display->display_options['menu']['description'] = 'List all nodes with their Page Titles';
  175. $handler->display->display_options['menu']['weight'] = '0';
  176. $translatables['list_page_titles'] = array(
  177. t('Defaults'),
  178. t('Page Title List'),
  179. t('more'),
  180. t('Apply'),
  181. t('Reset'),
  182. t('Sort By'),
  183. t('Asc'),
  184. t('Desc'),
  185. t('Items per page'),
  186. t('- All -'),
  187. t('Offset'),
  188. t('Listed below are all the nodes on the site with their Page Title (if set).'),
  189. t('There is no content to list.'),
  190. t('Nid'),
  191. t('Title'),
  192. t('Edit link'),
  193. t('Node ID (NID) is:'),
  194. t('Title Contains:'),
  195. t('"Page Title" Contains:'),
  196. t('Page'),
  197. );
  198. return array($view->name => $view);
  199. }