drupal-6.menu.database.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <?php
  2. db_insert('variable')->fields(array(
  3. 'name',
  4. 'value',
  5. ))
  6. ->values(array(
  7. 'name' => 'menu_default_node_menu',
  8. 'value' => 's:15:"secondary-links";',
  9. ))
  10. ->values(array(
  11. 'name' => 'menu_primary_links_source',
  12. 'value' => 's:15:"secondary-links";',
  13. ))
  14. ->values(array(
  15. 'name' => 'menu_secondary_links_source',
  16. 'value' => 's:13:"primary-links";',
  17. ))
  18. ->execute();
  19. // Add some links to the menus.
  20. db_insert('menu_links')->fields(array(
  21. 'menu_name',
  22. 'mlid',
  23. 'plid',
  24. 'link_path',
  25. 'router_path',
  26. 'link_title',
  27. 'options',
  28. 'module',
  29. 'hidden',
  30. 'external',
  31. 'has_children',
  32. 'expanded',
  33. 'weight',
  34. 'depth',
  35. 'customized',
  36. 'p1',
  37. 'p2',
  38. 'p3',
  39. 'p4',
  40. 'p5',
  41. 'p6',
  42. 'p7',
  43. 'p8',
  44. 'p9',
  45. 'updated',
  46. ))
  47. ->values(array(
  48. 'menu_name' => 'navigation',
  49. 'mlid' => '201',
  50. 'plid' => '0',
  51. 'link_path' => 'node/add',
  52. 'router_path' => 'node/add',
  53. 'link_title' => 'nodeadd-navigation',
  54. 'options' => 'a:0:{}',
  55. 'module' => 'menu',
  56. 'hidden' => '0',
  57. 'external' => '0',
  58. 'has_children' => '1',
  59. 'expanded' => '0',
  60. 'weight' => '1',
  61. 'depth' => '1',
  62. 'customized' => '0',
  63. 'p1' => '201',
  64. 'p2' => '0',
  65. 'p3' => '0',
  66. 'p4' => '0',
  67. 'p5' => '0',
  68. 'p6' => '0',
  69. 'p7' => '0',
  70. 'p8' => '0',
  71. 'p9' => '0',
  72. 'updated' => '0',
  73. ))
  74. ->values(array(
  75. 'menu_name' => 'primary-links',
  76. 'mlid' => '204',
  77. 'plid' => '0',
  78. 'link_path' => 'node/add',
  79. 'router_path' => 'node/add',
  80. 'link_title' => 'nodeadd-primary',
  81. 'options' => 'a:0:{}',
  82. 'module' => 'menu',
  83. 'hidden' => '0',
  84. 'external' => '0',
  85. 'has_children' => '1',
  86. 'expanded' => '0',
  87. 'weight' => '1',
  88. 'depth' => '1',
  89. 'customized' => '0',
  90. 'p1' => '204',
  91. 'p2' => '0',
  92. 'p3' => '0',
  93. 'p4' => '0',
  94. 'p5' => '0',
  95. 'p6' => '0',
  96. 'p7' => '0',
  97. 'p8' => '0',
  98. 'p9' => '0',
  99. 'updated' => '0',
  100. ))
  101. ->values(array(
  102. 'menu_name' => 'secondary-links',
  103. 'mlid' => '205',
  104. 'plid' => '0',
  105. 'link_path' => 'node/add',
  106. 'router_path' => 'node/add',
  107. 'link_title' => 'nodeadd-secondary',
  108. 'options' => 'a:0:{}',
  109. 'module' => 'menu',
  110. 'hidden' => '0',
  111. 'external' => '0',
  112. 'has_children' => '1',
  113. 'expanded' => '0',
  114. 'weight' => '1',
  115. 'depth' => '1',
  116. 'customized' => '0',
  117. 'p1' => '205',
  118. 'p2' => '0',
  119. 'p3' => '0',
  120. 'p4' => '0',
  121. 'p5' => '0',
  122. 'p6' => '0',
  123. 'p7' => '0',
  124. 'p8' => '0',
  125. 'p9' => '0',
  126. 'updated' => '0',
  127. ))
  128. ->values(array(
  129. 'menu_name' => 'secondary-links',
  130. 'mlid' => '206',
  131. 'plid' => '0',
  132. 'link_path' => 'node',
  133. 'router_path' => 'node',
  134. 'link_title' => 'node-page-with-query',
  135. 'options' => 'a:2:{s:5:"query";s:14:"page=1&node=10";s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
  136. 'module' => 'menu',
  137. 'hidden' => '0',
  138. 'external' => '0',
  139. 'has_children' => '0',
  140. 'expanded' => '0',
  141. 'weight' => '2',
  142. 'depth' => '1',
  143. 'customized' => '1',
  144. 'p1' => '206',
  145. 'p2' => '0',
  146. 'p3' => '0',
  147. 'p4' => '0',
  148. 'p5' => '0',
  149. 'p6' => '0',
  150. 'p7' => '0',
  151. 'p8' => '0',
  152. 'p9' => '0',
  153. 'updated' => '0',
  154. ))
  155. ->execute();
  156. db_insert('blocks')->fields(array(
  157. 'bid',
  158. 'module',
  159. 'delta',
  160. 'theme',
  161. 'status',
  162. 'weight',
  163. 'region',
  164. 'custom',
  165. 'throttle',
  166. 'visibility',
  167. 'pages',
  168. 'title',
  169. 'cache',
  170. ))
  171. ->values(array(
  172. 'bid' => '4',
  173. 'module' => 'menu',
  174. 'delta' => 'primary-links',
  175. 'theme' => 'garland',
  176. 'status' => '1',
  177. 'weight' => '0',
  178. 'region' => 'left',
  179. 'custom' => '0',
  180. 'throttle' => '0',
  181. 'visibility' => '0',
  182. 'pages' => '',
  183. 'title' => 'My Primary Links',
  184. 'cache' => '-1',
  185. ))
  186. ->values(array(
  187. 'bid' => '5',
  188. 'module' => 'menu',
  189. 'delta' => 'secondary-links',
  190. 'theme' => 'garland',
  191. 'status' => '1',
  192. 'weight' => '0',
  193. 'region' => 'left',
  194. 'custom' => '0',
  195. 'throttle' => '0',
  196. 'visibility' => '0',
  197. 'pages' => '',
  198. 'title' => 'My Secondary Links',
  199. 'cache' => '-1',
  200. ))
  201. ->execute();