Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. function issueTracker_init() {
  2. // drupal_set_message(t('hell, jars'));
  3. }
  4.  
  5. function issueTracker_menu() {
  6. $items = array();
  7. $items['issueTracker/custom'] = array(
  8. 'title' => 'New issue',
  9. 'description' => "Create new issue",
  10. 'page callback' => 'drupal_get_form',
  11. 'access arguments' => array('access content'),
  12. 'page arguments' => array('issueTracker_form'),
  13. 'access callback' => TRUE
  14. );
  15. return $items;
  16. }
  17.  
  18. function issueTracker_permission() {
  19. return array(
  20. 'custom path' => array(
  21. 'title' => t('Access the custom path'),
  22. 'description' => t('Allow users access to the custom path'),
  23. ),
  24. );
  25. }
  26.  
  27. function issueTracker_help($path, $arg) {
  28. switch ($path) {
  29. case 'admin/help#issueTracker':
  30. return '<p>' . t('Form to capture user issues') . '</p>';
  31. break;
  32. }
  33. }
  34.  
  35. function issueTracker_block_info(){
  36. $blocks['current issues'] = array(
  37. 'info' => t('Current issues'),
  38. 'cache' => DRUPAL_CACHE_PER_ROLE,
  39. );
  40. return $blocks;
  41. }
  42.  
  43. function issueTracker_form($form, &$form_state) {
  44. $form['issueDescription'] = array(
  45. '#type' => 'textfield',
  46. '#title' => t('Issue Description'),
  47. '#size' => 255,
  48. '#maxlength' => 255,
  49. '#required' => TRUE,
  50. );
  51. $form['submit_button'] = array(
  52. '#type' => 'submit',
  53. '#value' => t('Click here'),
  54. );
  55. return $form;
  56. }
  57.  
  58.  
  59.  
  60. function issueTracker_form_validate($form, &$form_state) {
  61.  
  62. }
  63.  
  64. function issueTracker_form_submit($form, &$form_state) {
  65.  
  66. }
  67.  
  68. function issueTracker_helper() {
  69. return '<p>Hell, jello</p>';
  70. }
  71.  
  72. function issueTracker_schema() {
  73. $schema = array();
  74. $schema['domIssues'] = array(
  75.  
  76. // Example (partial) specification for table "node".
  77. 'description' => 'Tracking issues.',
  78. 'fields' => array(
  79. 'issueID' => array(
  80. 'description' => 'The primary identifier for an issue.',
  81. 'type' => 'serial',
  82. 'unsigned' => TRUE,
  83. 'not null' => TRUE,
  84. ),
  85. 'issueDate' => array(
  86. 'description' => 'Date issue created.',
  87. 'mysql_type' => 'DATETIME',
  88. 'unsigned' => TRUE,
  89. 'not null' => TRUE,
  90. ),
  91. 'issueDescription' => array(
  92. 'description' => 'Issue details.',
  93. 'type' => 'varchar',
  94. 'length' => 255,
  95. 'not null' => TRUE,
  96. 'default' => '',
  97. ),
  98. 'lastModified' => array(
  99. 'description' => 'Issue last touched.',
  100. 'mysql_type' => 'DATETIME',
  101. 'not null' => TRUE,
  102. ),
  103. ),
  104. // 'indexes' => array(
  105. // 'issue_changed' => array('changed'),
  106. // 'issue_created' => array('created'),
  107. // ),
  108. // 'unique keys' => array(
  109. // 'nid_vid' => array('nid', 'vid'),
  110. // 'vid' => array('vid'),
  111. // ),
  112. // 'foreign keys' => array(
  113. // 'node_revision' => array(
  114. // 'table' => 'node_revision',
  115. // 'columns' => array('vid' => 'vid'),
  116. // ),
  117. // 'issue_author' => array(
  118. // 'table' => 'users',
  119. // 'columns' => array('uid' => 'uid'),
  120. // // ),
  121. // ),
  122. 'primary key' => array('issueID'),
  123. );
  124. return $schema;
  125. }
  126.  
  127. Drupal version : 7.32
  128. Site URI : http://default
  129. Database driver : mysql
  130. Database username : dbo
  131. Database name : db
  132. Database : Connected
  133. Drupal bootstrap : Successful
  134. Drupal user : Anonymous
  135. Default theme : velocity
  136. Administration theme : seven
  137. PHP executable : /home/sam/.phpbrew/php/php-5.4.34/bin/php
  138. PHP configuration : /home/sam/.phpbrew/php/php-5.4.34/etc/php.i
  139. ni
  140. PHP OS : Linux
  141. Drush version : 6.2.0
  142. Drush configuration :
  143. Drush alias files :
  144. Drupal root : /media/psf/Home/apps/umhef
  145. Site path : sites/default
  146. File directory path : sites/default/files
  147. Temporary file directory path : sites/default/files/tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement