| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Implementation of hook_install(). 5 */ 6 function contact_install() { 7 // Create tables. 8 drupal_install_schema('contact'); 9 } 10 11 /** 12 * Implementation of hook_uninstall(). 13 */ 14 function contact_uninstall() { 15 // Remove tables. 16 drupal_uninstall_schema('contact'); 17 18 variable_del('contact_default_status'); 19 variable_del('contact_form_information'); 20 variable_del('contact_hourly_threshold'); 21 } 22 23 /** 24 * Implementation of hook_schema(). 25 */ 26 function contact_schema() { 27 $schema['contact'] = array( 28 'description' => 'Contact form category settings.', 29 'fields' => array( 30 'cid' => array( 31 'type' => 'serial', 32 'unsigned' => TRUE, 33 'not null' => TRUE, 34 'description' => 'Primary Key: Unique category ID.', 35 ), 36 'category' => array( 37 'type' => 'varchar', 38 'length' => 255, 39 'not null' => TRUE, 40 'default' => '', 41 'description' => 'Category name.', 42 ), 43 'recipients' => array( 44 'type' => 'text', 45 'not null' => TRUE, 46 'size' => 'big', 47 'description' => 'Comma-separated list of recipient e-mail addresses.', 48 ), 49 'reply' => array( 50 'type' => 'text', 51 'not null' => TRUE, 52 'size' => 'big', 53 'description' => 'Text of the auto-reply message.', 54 ), 55 'weight' => array( 56 'type' => 'int', 57 'not null' => TRUE, 58 'default' => 0, 59 'size' => 'tiny', 60 'description' => "The category's weight.", 61 ), 62 'selected' => array( 63 'type' => 'int', 64 'not null' => TRUE, 65 'default' => 0, 66 'size' => 'tiny', 67 'description' => 'Flag to indicate whether or not category is selected by default. (1 = Yes, 0 = No)', 68 ), 69 ), 70 'primary key' => array('cid'), 71 'unique keys' => array( 72 'category' => array('category'), 73 ), 74 'indexes' => array( 75 'list' => array('weight', 'category'), 76 ), 77 ); 78 79 return $schema; 80 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |