Advertisement
Guest User

Untitled

a guest
Feb 27th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. $view = new view;
  2. $view->name = 'image_gallery';
  3. $view->description = 'The default gallery of image nodes from Image gallery module.';
  4. $view->tag = 'image_gallery';
  5. $view->base_table = 'node';
  6. $view->core = 0;
  7. $view->api_version = '2';
  8. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  9. $handler = $view->new_display('default', 'Defaults', 'default');
  10. $handler->override_option('fields', array(
  11. 'image_image' => array(
  12. 'label' => '',
  13. 'alter' => array(
  14. 'alter_text' => 0,
  15. 'text' => '',
  16. 'make_link' => 0,
  17. 'path' => '',
  18. 'alt' => '',
  19. 'prefix' => '',
  20. 'suffix' => '',
  21. 'help' => '',
  22. 'trim' => 0,
  23. 'max_length' => '',
  24. 'word_boundary' => 1,
  25. 'ellipsis' => 1,
  26. 'html' => 0,
  27. ),
  28. 'link_to_node' => 1,
  29. 'image_derivative' => 'thumbnail',
  30. 'exclude' => 0,
  31. 'id' => 'image_image',
  32. 'table' => 'node',
  33. 'field' => 'image_image',
  34. 'relationship' => 'none',
  35. ),
  36. 'title' => array(
  37. 'label' => '',
  38. 'alter' => array(
  39. 'alter_text' => 0,
  40. 'text' => '',
  41. 'make_link' => 0,
  42. 'path' => '',
  43. 'alt' => '',
  44. 'prefix' => '',
  45. 'suffix' => '',
  46. 'help' => '',
  47. 'trim' => 0,
  48. 'max_length' => '',
  49. 'word_boundary' => 1,
  50. 'ellipsis' => 1,
  51. 'html' => 0,
  52. ),
  53. 'link_to_node' => 1,
  54. 'exclude' => 0,
  55. 'id' => 'title',
  56. 'table' => 'node',
  57. 'field' => 'title',
  58. 'relationship' => 'none',
  59. ),
  60. ));
  61. $handler->override_option('sorts', array(
  62. 'title' => array(
  63. 'id' => 'title',
  64. 'table' => 'node',
  65. 'field' => 'title',
  66. ),
  67. 'changed' => array(
  68. 'order' => 'DESC',
  69. 'granularity' => 'second',
  70. 'id' => 'changed',
  71. 'table' => 'node',
  72. 'field' => 'changed',
  73. 'relationship' => 'none',
  74. ),
  75. ));
  76. $handler->override_option('filters', array(
  77. 'status' => array(
  78. 'operator' => '=',
  79. 'value' => '1',
  80. 'group' => '0',
  81. 'exposed' => FALSE,
  82. 'expose' => array(
  83. 'operator' => FALSE,
  84. 'label' => '',
  85. ),
  86. 'id' => 'status',
  87. 'table' => 'node',
  88. 'field' => 'status',
  89. 'relationship' => 'none',
  90. ),
  91. 'type' => array(
  92. 'operator' => 'in',
  93. 'value' => array(
  94. 'image' => 'image',
  95. ),
  96. 'group' => '0',
  97. 'exposed' => FALSE,
  98. 'expose' => array(
  99. 'operator' => FALSE,
  100. 'label' => '',
  101. ),
  102. 'id' => 'type',
  103. 'table' => 'node',
  104. 'field' => 'type',
  105. 'relationship' => 'none',
  106. ),
  107. ));
  108. $handler->override_option('access', array(
  109. 'type' => 'none',
  110. ));
  111. $handler->override_option('cache', array(
  112. 'type' => 'none',
  113. ));
  114. $handler->override_option('title', 'Image galleries');
  115. $handler->override_option('empty', 'There are no images in this gallery.');
  116. $handler->override_option('empty_format', '1');
  117. $handler->override_option('items_per_page', 12);
  118. $handler->override_option('use_pager', '1');
  119. $handler->override_option('style_plugin', 'image_gallery');
  120. $handler->override_option('style_options', array(
  121. 'grouping' => '',
  122. 'type' => 'ul',
  123. ));
  124. $handler = $view->new_display('image_gallery', 'Gallery page', 'image_gallery_1');
  125. $handler->override_option('path', 'image');
  126. $handler->override_option('menu', array(
  127. 'type' => 'none',
  128. 'title' => '',
  129. 'description' => '',
  130. 'weight' => 0,
  131. 'name' => 'navigation',
  132. ));
  133. $handler->override_option('tab_options', array(
  134. 'type' => 'none',
  135. 'title' => '',
  136. 'description' => '',
  137. 'weight' => 0,
  138. 'name' => 'navigation',
  139. ));
  140. $handler = $view->new_display('block', 'Block', 'block_1');
  141. $handler->override_option('filters', array(
  142. 'status' => array(
  143. 'operator' => '=',
  144. 'value' => '1',
  145. 'group' => '0',
  146. 'exposed' => FALSE,
  147. 'expose' => array(
  148. 'operator' => FALSE,
  149. 'label' => '',
  150. ),
  151. 'id' => 'status',
  152. 'table' => 'node',
  153. 'field' => 'status',
  154. 'relationship' => 'none',
  155. ),
  156. 'type' => array(
  157. 'operator' => 'in',
  158. 'value' => array(
  159. 'image' => 'image',
  160. ),
  161. 'group' => '0',
  162. 'exposed' => FALSE,
  163. 'expose' => array(
  164. 'operator' => FALSE,
  165. 'label' => '',
  166. ),
  167. 'id' => 'type',
  168. 'table' => 'node',
  169. 'field' => 'type',
  170. 'relationship' => 'none',
  171. ),
  172. 'name' => array(
  173. 'operator' => '=',
  174. 'value' => 'EventGallery',
  175. 'group' => '0',
  176. 'exposed' => FALSE,
  177. 'expose' => array(
  178. 'operator' => FALSE,
  179. 'label' => '',
  180. 'optional' => FALSE,
  181. ),
  182. 'case' => 1,
  183. 'id' => 'name',
  184. 'table' => 'term_data',
  185. 'field' => 'name',
  186. 'override' => array(
  187. 'button' => 'Use default',
  188. ),
  189. 'relationship' => 'none',
  190. ),
  191. ));
  192. $handler->override_option('title', 'Image Gallery');
  193. $handler->override_option('block_description', '');
  194. $handler->override_option('block_caching', -1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement