tweetbutton.install 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Implements hook_field_schema()
  4. */
  5. function tweetbutton_field_schema($field) {
  6. switch ($field['type']) {
  7. case 'tweetbutton':
  8. $columns = array(
  9. 'text' => array(
  10. 'type' => 'varchar',
  11. 'length' => 128,
  12. 'not null' => FALSE,
  13. ),
  14. 'account' => array(
  15. 'type' => 'varchar',
  16. 'length' => 32,
  17. 'not null' => FALSE,
  18. ),
  19. );
  20. break;
  21. }
  22. return array(
  23. 'columns' => $columns,
  24. 'indexes' => array(
  25. 'account' => array('account'),
  26. 'text' => array('text'),
  27. ),
  28. );
  29. }
  30. /**
  31. * Implementation of hook_uninstall()
  32. */
  33. function tweetbutton_uninstall() {
  34. variable_del('tweetbutton_button');
  35. variable_del('tweetbutton_tweet_text');
  36. variable_del('tweetbutton_tweet_url');
  37. variable_del('tweetbutton_language');
  38. variable_del('tweetbutton_account');
  39. variable_del('tweetbutton_rel_account_name');
  40. variable_del('tweetbutton_rel_account_description');
  41. variable_del('tweetbutton_node_weight');
  42. variable_del('tweetbutton_node_types');
  43. variable_del('tweetbutton_node_location');
  44. variable_del('tweetbutton_shorten_service');
  45. variable_del('tweetbutton_follow_show_count');
  46. variable_del('tweetbutton_follow_screen_name');
  47. variable_del('tweetbutton_follow_size');
  48. }